Website code for CANFAR.net.
The configuration is handled by YAML files located in the _data directory.
This file contains every textualized item on the site. The original
(and possibly future) intent was to have a bi-lingual site, so both the
en versions have been maintained.
This also offers a convenient way to store re-usable items from the menus so that we can maintain consistency between the left menu and the drop down menus.
This is menu layout for the dropdown menus and related left-menu (side nav).
The format is:
<menuname> is the related name in translations.yml under the language.
<items> are the same, but they can also be declared as hierarchical using dot (
For example, the
Services dropdown menu is made up of first level and second level (indented) items like so:
services: ['uvic', 'uvic.cloud_portal', 'cadc', 'cadc.digital_object_identifiers', 'cadc.storage', 'cadc.batch_processing', 'cadc.group_management']
Which will look in the translations.yml file for:
%PAGE_LANGUAGE%/services to get the name to display (
Service), then, for each item, will look for
%PAGE_LANGUAGE%/services/%ITEM_PATH% to get their links and names to display.
This is just a configurable way to set the looping showcase images on the front page.
Running locally (Development)
docker pull jekyll/jekyll:pages
which is meant as very close simulation of running the site on GitHub.
Then it can be run by cloning this repository. Ensure the
HOSTNAME variable is set:
or add it into a
.env file in this folder.
Then starting the Docker container using the supplied
~$ mkdir $HOME/src && cd $HOME/src ~$ git clone https://github.com/canfar/canfar.github.io canfar_site ~$ cd canfar_site ~$ docker-compose up -d
Or directly using the
~$ mkdir $HOME/src && cd $HOME/src ~$ git clone https://github.com/canfar/canfar.github.io canfar_site ~$ docker run --rm --name canfar-site -p 4000:4000 -v $(pwd)/canfar_site:/srv/jekyll jekyll/jekyll:pages bundle install && jekyll s
Then point a browser to the local site.
Normal development can occur in the
and will be immediately reflected after a page refresh.
Also, if the _config.yml file contains a
baseurl value, it should be commented out before the server starts
(or comment it out then restart).