Skip to content
Snippets Groups Projects
README.md 3.84 KiB
Newer Older
Thomas Wood's avatar
Thomas Wood committed
---
layout: page
title: PSVG Group Website Readme
Thomas Wood's avatar
Thomas Wood committed
---

This readme file is published in its fully rendered form [on the website](https://psvg.doc.ic.ac.uk/README.html).
The source code for [this site](https://psvg.doc.ic.ac.uk) is [hosted on the DoC GitLab server](https://gitlab.doc.ic.ac.uk/resource-reasoning/psvg.doc.ic.ac.uk),
you should have access to edit it if a member of the resource-reasoning group.
**DO NOT EDIT THE SOURCE CODE IN `/vol/rr/www`, IT IS ALL REPLACED EACH TIME THE SITE IS REBUILT FROM VERSION CONTROL**

[![Build Status](https://gitlab.doc.ic.ac.uk/resource-reasoning/psvg.doc.ic.ac.uk/badges/master/build.svg)](https://gitlab.doc.ic.ac.uk/resource-reasoning/psvg.doc.ic.ac.uk/commits/master)
[![Dependency Status](https://gemnasium.com/bd81b2aa11ff43417700f75dbd194221.svg)](https://gemnasium.com/6ba7afbbfda9adcba06f007cc565a29a)

## Managing Content
Please see [the dedicated publications repository](https://gitlab.doc.ic.ac.uk/resource-reasoning/publications) for
instructions on how to add new publications to the website.
Technical Detail
----------------
Thomas Wood's avatar
Thomas Wood committed
This website is built using the [Jekyll](http://jekyllrb.com/) website framework.
Pages can be written using
Thomas Wood's avatar
Thomas Wood committed
[Markdown](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) (preferred) or HTML.
Thomas Wood's avatar
Thomas Wood committed
Files should be named with the extension they're writen in (.md, .markdown, .html, ...), they'll be compiled to .html
versions of the file on publication. (Unless otherwise specified with the 'permalink' property of the page).

Pages to be interpreted by the Jekyll framework should be started with a YAML variable block. The variables here can be
used to change properties of the page. For further details, see the [Jekyll documentation](https://jekyllrb.com/docs/frontmatter/).
For example, to set the page title and it's URL:
```yaml
---
title: Page Name
Thomas Wood's avatar
Thomas Wood committed
permalink: /my-custom-page-path/
---
```
Thomas Wood's avatar
Thomas Wood committed

Thomas Wood's avatar
Thomas Wood committed
Variables that templates currently take into account are:
Thomas Wood's avatar
Thomas Wood committed

* `title`, sets the page title
* `menu`, (default: false) places the page into the website's navigation menu
* `menu_order`, decides the order of menu
* `parent_menu`, creates a parent menu with a dropdown box including the current page. 
  Pages with the same parent menu are put in the same box.
  Please also ensures the existence of parent_menu and its value, and menu_order are consistent.
* `sub_menu_order`, decides the order of menu in corresponding dropdown box.
* `project_id`, links the page to a project.
* `project`, (please only use this for person, i.e. file under the directory of _people), links a person to a project.
* `firstname, lastname, position, webpage, email, github`, describes a person.
Thomas Wood's avatar
Thomas Wood committed

The main content of the page should then follow.

Any other files present in the directory structure (except for those prefixed with `_`, `.`, or explicitly excluded in `_config.yml`) will be published unchanged to the website.

For the detail of adding publication, please refer to the README file in publication directory.
Thomas Wood's avatar
Thomas Wood committed
Testing and Deployment
----------------------
The DoC GitLab instance is configured (using .gitlab-ci.yml) to build, test and deploy the website on tests passing.
The tests run are to check that the build works (no critical syntax errors in templates), and that internal page links
are consistent.

An additional check that external links are still live is also run, but this test is permitted to fail without blocking
the deployment.

Thomas Wood's avatar
Thomas Wood committed
The site is deployed to `/vol/rr/www` automatically on successful build.
Thomas Wood's avatar
Thomas Wood committed

Thomas Wood's avatar
Thomas Wood committed
Locally Building and Testing
----------------------------
If you wish to test the site locally, ensure you have ruby installed, and then initially run:
```
gem install bundler
bundle install
bundle exec rake init
```

And to start a local webserver that remakes files whenever changed:
```
```

You can test for dead links and html errors using:
```
bundle exec rake test
```