This repository holds the source for the University of Sheffield's data visualisation hub. The site is generated from the files here using the Nikola static site generator.
To contribute, raise an issue on GitHub or make a pull request that adds or modifies files in the pages
directory. You will probably want to install Nikola so that you can test your contribution before submitting it.
If you are comfortable using the command-line and have a working installation of Python 3 and pip
, here are some quick-start instructions:
- Install Pipenv:
pip install pipenv
- Create a virtualenv and install dependencies in one step:
pipenv install --dev
- Start a local web server to preview the site:
pipenv run nikola auto
- Visit http://localhost:8000 in your browser
There are also some full installation instructions for Nikola.
Have a look at the contributing page for general guidance
Install Nikola
Fork this repo, clone it to your machine and enter the directory.
<-- insert any branch specific insturctions here -->
Create a file in the pages/
directory. It will need to start with a header like this:
<!--
.. title: Accelerated versions of R for Iceberg
.. author: Mike Croucher # optional
.. slug: intel-R-iceberg # optional
.. date: 2016-09-12 00:31:35 UTC # optional
.. tags: # optional
.. category: # optional
-->
The slug
refers to the end of the URL and it will need to be unique.
- (on github) create new page by clicking
create new file
inpages/
dir.
- if
.rmd
, create inrmd/
and render to thepages/
dir.
- if an
.ipnb
in thepages/
dir.- create new
.ipnb
- in the
.ipnb
, go toedit
, thenedit notebook metadata
and add the following snippet to the top level of the notebook metadata.json"nikola": { "title": "Visualising Networks", "slug": "visualising-networks", "date": "2012-09-15 19:52:05 UTC" }
- create new
nikola new_post
nikola new_post -f markdown
You can build and test your post on your own machine using:
cd site
nikola build
If the build is OK, you can look at it on your browser with
nikola serve --browser
As an alternative to repeatedly running nikola build
every time you make a change you can run:
nikola auto
to detect changes, automatically rebuild your site and refresh your browser.
When you are happy, submit a Pull Request.
To publish a post, accept the PR then from the site
directory you can run a single command to:
- commit a rendered version of the site to the
master
branch then - push this to the
origin
(notupstream
) branch on GitHub
this command being:
nikola github_deploy