This provides the frontpage of data.gov.bc.ca.
There is also a Vagrant box and Dockerfile available to make setup easier.
- Clone the repo and
cd
into the directory. npm install
bower install
grunt build
This will initialize the site files.
There is a grunt dev
task that acts as a watcher for development purposes. It will trigger a rebuild of the site as files change.
By default, the site is available at http://localhost:4000.
To serve the site using Jekyll, use the grunt serve --host=<host> --port=<port>
command. By default, it uses the following options:
host=0.0.0.0
port=4000
The site will be available at http://<host>:<port>
.
Content is not tracked inside this repo. The site uses a custom post type called visualizations
and is stored in Markdown format inside the _visualizations
directory.
The visualization
post type follows this format:
---
layout: visualization
title:
published:
source:
name:
url:
iframe_url:
order:
---
Field | Explanation |
---|---|
layout |
The layout used when Jekyll generates the static HTML. Leave as visualization . |
title |
The title of the visualization. |
published |
Boolean value. true shows the visualization on the front-page inside the carousel, false hides it. |
source |
The source of the visualization. The name provides a name, and url provides a link to the source. |
iframe_url |
An embeddable version of the visualization. This is included on the front-page of the site inside a carousel. |
order |
An optional field that determines the order of the visualizations. Ascending order. |
Here is an example of a visualization:
---
layout: visualization
title: My Visualization
published: true
source:
name: The name of my Visualization source
url: http://link.to.my.visualization.source.com
iframe_url: http://link.to.my.visualization.frame.com
order: 100
---