Overview
The Foundation for Public Code Jekyll theme is designed to set up quick and generic static sites, particularly for use with GitHub pages. It aims to maintain consistency and maintainability across websites through the use of Markdown for content preservation. This theme is primarily used internally by the Foundation for Public Code to create version controlled single sources of truth with hyperlinked content that can be transformed and collated as needed.
Features
- Designed for use with GitHub pages
- Keeps content in Markdown for mutability and preservation
- Customizable table of contents for the entire site or specific pages
- Breadcrumbs for easy navigation
- Option to add metadata to posts
- Ability to redirect pages
- Remove the Foundation for Public Code footer
- Experimental feature: navigation display
- Separate rendering of titles
- Language configuration for HTML tag
Installation
To build locally, make sure you have the github-pages gem installed. Run bundle install before building with Jekyll. To serve locally with Jekyll, use bundle exec jekyll serve.
To customize the table of contents, you can turn on its display for any page by adding toc: true to the _config.yml. Alternatively, you can add toc: true to the front matter of any specific page where you want the table of contents to display.
To enable breadcrumbs for every page on the site, add show_breadcrumbs: true to the config.yml.
To add metadata to a post, use the following front matter syntax:
---
...
metadata:
expires: <date>
bpmn: <filename>
...
---
To redirect a page, use the redirected layout by adding the following front matter to the page:
---
layout: redirected
redirect_to: <target URL>
...
---
To remove the Foundation for Public Code footer, set hide_foundation_footer: true in the _config.yml.
For the experimental feature of navigation display, add show_navigation: true to the _config.yml. The order of navigation items can be set using the order property in the front matter or _config.yml. To hide a page, set hidden: true.
To separately render the title, set the Jekyll titles from headings to strip the titles.
Summary
The Foundation for Public Code Jekyll theme allows for the quick setup of static sites, particularly for use with GitHub pages. It focuses on consistency and maintainability through the use of Markdown for content preservation. With features such as customizable table of contents, breadcrumbs, metadata, and redirects, this theme offers flexibility and ease of navigation. The ability to remove the Foundation for Public Code footer and experiment with navigation display adds further customization options.