/dtf-ein.github.io

Team website on GitHub Pages.

Primary LanguageCSSMIT LicenseMIT

circleci

Digital Task Force website

Website for our team, working with the CIO of Shared Services Canada.

Local development

  1. Install Ruby (troubleshooting).
  2. Install bundler, dependencies and start the project:
# Install bundler
gem install bundler

# Install dependencies
cd /path/to/project
bundle install

# Start the project (http://localhost:4000)
jekyll serve --livereload

Add a new page

  1. Create an English and French version of the page in the respective ./_pages/en and ./_pages/fr directory.
  2. Use Jekyll front matter to link the pages together:
# English page
---
layout: page
title: Contact us
lang: en
ref: contact # must be same for linked English/French page
permalink: /contact-us/
---

# French page
---
layout: page
title: Contactez-nous
lang: fr
ref: contact
permalink: /contactez-nous/
---

Add translated strings

  1. Edit ./_data/i18n.yml to add new English/French strings.
  2. Use them in the templates like so:
{{ site.data.i18n.en.key_name }}          # English, hard-coded
{{ site.data.i18n.fr.key_name }}          # Français, hard-coded
{{ site.data.i18n[page.lang].key_name }}  # Dynamic, based on page's language

Publish changes

Any changes merged into master are automatically published.

Credit

Theme is based on the type-theme template.