Make nl pages build in a separate directory

This commit is contained in:
Ivar Derksen
2020-10-15 12:39:53 +02:00
parent d1306c6b81
commit 7687be7031
7 changed files with 59 additions and 20 deletions

View File

@@ -19,4 +19,4 @@ site:
paths:
- _site/*
script:
- bundle exec jekyll build --config _config.yml
- bundle exec jekyll build --config _config_production.yml

View File

@@ -18,7 +18,7 @@ gem "jekyll", "~> 3.6.0"
group :jekyll_plugins do
gem "jekyll-feed", "~> 0.6"
gem "jekyll-menus", "0.6"
gem 'jekyll-multiple-languages-plugin'
gem "jekyll-multiple-languages-plugin", "~> 1.7.0"
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem

View File

@@ -21,8 +21,8 @@ GEM
jekyll (~> 3.3)
jekyll-menus (0.6.0)
jekyll (~> 3.1)
jekyll-multiple-languages-plugin (1.6.0)
jekyll (>= 2.0, < 4.0)
jekyll-multiple-languages-plugin (1.7.0)
jekyll (>= 2.0, < 5.0)
jekyll-sass-converter (1.5.2)
sass (~> 3.4)
jekyll-watch (1.5.1)
@@ -54,5 +54,8 @@ DEPENDENCIES
jekyll (~> 3.6.0)
jekyll-feed (~> 0.6)
jekyll-menus (= 0.6)
jekyll-multiple-languages-plugin
jekyll-multiple-languages-plugin (~> 1.7.0)
tzinfo-data
BUNDLED WITH
2.0.2

View File

@@ -1,3 +1,27 @@
# irma-website
Repository for the static website at irma.app
## Developing
For this project Ruby on Rails must be installed on your pc. You can
serve a development website in the following way:
```shell script
bundle install
bundle exec jekyll serve
```
To switch languages you have to update the url to for example `http://localhost:4000/en`.
The root directory will show the `nl` pages.
## Building for production
For a production build we need the dutch language files to be in a separate directory
(just like the other languages). This is configured for you in the `_config_production.yml`.
This means building for production works as follows:
```shell script
bundle install
bundle exec jekyll build --config _config_production.yml
```
Now the build files can be found in the `_site` directory.

View File

@@ -1,5 +1,5 @@
---
title: IRMA
title: IRMA (Development version)
author: Privacy by Design Foundation
email: ''
description: Met IRMA heb je in de hand wat er met jouw gegevens gebeurt.
@@ -7,12 +7,12 @@ baseurl: ""
url: ''
languages: ["nl", "fr", "en", "de"]
defaults:
- scope:
path: ''
values:
layout: default
- scope:
path: ''
values:
layout: default
markdown: kramdown
plugins:
- jekyll-feed
- jekyll-menus
- jekyll-multiple-languages-plugin
- jekyll-feed
- jekyll-menus
- jekyll-multiple-languages-plugin

View File

@@ -1,7 +0,0 @@
# Development server config
# This config is only used for the development server
# No settings provided here will affect production builds
url: http://localhost:3000
host: localhost
port: 3000

19
_config_production.yml Normal file
View File

@@ -0,0 +1,19 @@
---
title: IRMA
author: Privacy by Design Foundation
email: ''
description: Met IRMA heb je in de hand wat er met jouw gegevens gebeurt.
baseurl: ""
url: ''
languages: ["nl", "fr", "en", "de"]
default_locale_in_subfolder: true
defaults:
- scope:
path: ''
values:
layout: default
markdown: kramdown
plugins:
- jekyll-feed
- jekyll-menus
- jekyll-multiple-languages-plugin