From 7687be703160ea5ad4a7ba35749ea181a6d1d4e8 Mon Sep 17 00:00:00 2001 From: Ivar Derksen Date: Thu, 15 Oct 2020 12:39:53 +0200 Subject: [PATCH] Make nl pages build in a separate directory --- .gitlab-ci.yml | 2 +- Gemfile | 2 +- Gemfile.lock | 9 ++++++--- README.md | 24 ++++++++++++++++++++++++ _config.yml | 16 ++++++++-------- _config_development.yml | 7 ------- _config_production.yml | 19 +++++++++++++++++++ 7 files changed, 59 insertions(+), 20 deletions(-) delete mode 100644 _config_development.yml create mode 100644 _config_production.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f46c980..bfcd249 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -19,4 +19,4 @@ site: paths: - _site/* script: - - bundle exec jekyll build --config _config.yml + - bundle exec jekyll build --config _config_production.yml diff --git a/Gemfile b/Gemfile index 995e049..d36a2a0 100644 --- a/Gemfile +++ b/Gemfile @@ -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 diff --git a/Gemfile.lock b/Gemfile.lock index 50d08c5..0c259ed 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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 diff --git a/README.md b/README.md index 94556f3..952f2c5 100755 --- a/README.md +++ b/README.md @@ -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. diff --git a/_config.yml b/_config.yml index d2cbdf8..4a06839 100644 --- a/_config.yml +++ b/_config.yml @@ -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 diff --git a/_config_development.yml b/_config_development.yml deleted file mode 100644 index f842327..0000000 --- a/_config_development.yml +++ /dev/null @@ -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 \ No newline at end of file diff --git a/_config_production.yml b/_config_production.yml new file mode 100644 index 0000000..34ebff5 --- /dev/null +++ b/_config_production.yml @@ -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