- HTML 55.1%
- JavaScript 29.2%
- SCSS 14.1%
- Ruby 1.6%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| _data | ||
| _includes | ||
| assets | ||
| de | ||
| en | ||
| fr | ||
| it | ||
| .gitignore | ||
| _config.yml | ||
| editing-texts-cover.svg | ||
| EDITING-TEXTS.md | ||
| Gemfile | ||
| index.html | ||
| LICENSE | ||
| README.md | ||
swiyu-support-wizard
Support wizard for organizations using swiyu. The site is built with Jekyll and published via GitHub Pages — GitHub builds it automatically, there is no build step to run yourself.
The look & feel matches the swiyu technical documentation
(repository): both use the
Minimal Mistakes theme in the same version,
with the same skin, logo, masthead and footer. When the documentation changes its theme
version or settings, update remote_theme and the related settings in _config.yml as well.
Structure
| Path | Purpose |
|---|---|
_data/wizard.yml |
Decision tree: questions, options and result pages |
_data/i18n.yml |
UI texts of the wizard (buttons, support form URL, …) |
_data/navigation.yml |
Masthead links (without the language switch) |
_data/ui-text.yml |
Translated theme texts (skip links, menu) |
_includes/masthead.html |
Theme masthead plus the language switch (keep in sync with the theme version) |
_includes/skip-links.html |
Theme skip links with translated label (keep in sync) |
_includes/wizard.html |
Wizard template |
_includes/head/custom.html |
Favicons and language alternates |
de/, fr/, it/, en/ |
One page per language (title and intro in the front matter) |
index.html |
Redirects to the language matching the browser settings |
assets/css/main.scss |
Theme styles plus the few wizard-specific styles |
assets/js/wizard.js |
Step navigation |
Header, hero and footer come from the theme; there is no custom layout. Overridden theme files (copies, keep them in sync when updating the theme version):
_includes/masthead.htmladds the language switch as a single navigation item, so the theme's responsive menu never splits the languages up, and translates the labels._includes/skip-links.htmltranslates the labels.
The theme's own translations (_data/ui-text.yml) are not loaded with remote_theme, so the
texts needed are in our _data/ui-text.yml.
Editing the wizard
Text editors without development background: see EDITING-TEXTS.md for how to change texts directly on GitHub via pull request.
All questions and answers live in _data/wizard.yml, the format is documented at the top of
the file. Sources of the texts (Confluence, e-ID Teamspace):
- "B2B wizard RESULTS TEXTS" →
_data/wizard.yml. The ids in the file match the ids used there and appear in the URL (e.g./de/#1.2.3). Entries marked as not yet publishable (grey) are left out; they are kept as comments in the file. - "B2B wizard and support form GENERIC TEXTS" →
_data/i18n.yml(buttons, headings, category subline, page title).
Texts not defined in Confluence (e.g. the intro text in the hero, the error message and the language names) were written by the development team and are marked as such.
Support form
All "Continue to support form" buttons lead to the actor support form:
https://ticket.swiyu.admin.ch/actor?topic=wizard&category=other&lang=de
The URL is set once as support_form_url in _data/i18n.yml; &lang= with the language of
the page is added automatically. The form requires both topic and category, otherwise it
shows "Bitte zuerst Thema auswählen". variant and forward_to in _data/wizard.yml
document the specification but are not passed to the form.
Adding a language
- Add the language code to
languagesin_config.yml. - Add the texts for the new language in
_data/wizard.yml,_data/i18n.yml, and_data/navigation.yml, and add its locale to_data/ui-text.yml. - Add
<lang>/index.html(copy ofde/index.htmlwithlang,locale,permalink,titleandexcerptadjusted). - Add the language name to
language_namein_data/i18n.yml.
Development
Run the site locally with Docker (no Ruby installation needed):
docker run --rm -it \
--network host \
-v /run/systemd/resolve/stub-resolv.conf:/etc/resolv.conf:ro \
-e http_proxy -e https_proxy -e no_proxy \
-v "$PWD":/site -w /site \
-v jekyll-gems:/usr/local/bundle \
ruby:3.3 \
sh -c "bundle install && bundle exec jekyll serve --host 127.0.0.1"
--network host, theresolv.confmount and the*_proxyvariables are only needed behind the federal proxy: they let the container use the proxy and the host's DNS (the default Docker DNS servers cannot resolve the proxy host). Elsewhere,-p 4000:4000and--host 0.0.0.0are enough.- The
jekyll-gemsvolume caches the gems, so only the first start takes a few minutes. - The theme is downloaded from GitHub on every build (
remote_theme), so network access is required.
Then open http://localhost:4000/.
Deployment
In the repository settings under Pages, choose Deploy from a branch with main and / (root).
Every push to main is published automatically after 1–2 minutes (see the Actions tab).
The repository is private, so GitHub Pages is access-controlled: the site is only visible to
people with read access to the repository and is served at the root of a *.pages.github.io
domain (the URL is shown under Settings → Pages). For this reason url and baseurl are
not set in _config.yml; the GitHub Pages build fills them in. All internal links must use
the relative_url / absolute_url filters.