Skip to content

Web development

Oliver Beckstein edited this page Apr 15, 2015 · 1 revision

Web development

Check out the repository, edit the pages, and push commits. The published pages are on the master branch.

Right now we are using the minimalist Hyde theme for Jekyll but we can change this so new pages (apparently) go under _posts. The _site directory is generated by Jekyll on the GitHub server side and should not be included in commits.

Additional static pages go under pages. If they have the layout type "page" they will be automatically included in the sidebar. The static "about" page is left at the top level.

The home page is generated from the only post in the _posts directory. Note that the newest post is on the front page so we don't really want to use this as a blog site. We should not have much more need of static pages than what's already there so right now the only post should be what is to appear as the home page.

Mark-up format: Markdown

The GitHub pages can either use HTML or markdown as processed by Jekyll.

Notes on using Jekyll

For links between pages to work, generate absolute links with site.baseurl liquid tag:

[see citations]({{site.baseurl}}pages/citations

The example will link to the file /pages/citations. Also note that one does not need spaces between the configuration variable and the curly braces (i.e. {{ site.baseurl }} as typical seen), so I avoid them to prevent the editor breaking the line inside the curly braces (which upsets Jekyll greatly).

We define additional variables in _config.yml and use them with liquid tags. In particular, the sidebar _includes/sidebar.html is configured with additional links that are all stored in the config file.

Local testing

To locally test that your edits look ok before pushing them, install Jekyll as described in the docs.

To run Jekyll in a way that matches the GitHub Pages build server, run Jekyll with Bundler. Use the command

bundle exec jekyll serve 

in the root of your repository (after switching to the gh-pages branch for project repositories), and your site should be available at http://localhost:4000. For a full list of Jekyll commands, see the Jekyll documentation.

Clone this wiki locally