Website for our team, working with the CIO of Shared Services Canada.
- Install Ruby (troubleshooting).
- 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
- Create an English and French version of the page in the respective
./_pages/en
and./_pages/fr
directory. - 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/
---
- Edit
./_data/i18n.yml
to add new English/French strings. - 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
Any changes merged into master are automatically published.
Theme is based on the type-theme template.