-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set all tokens and translation links needed by episode layout
- Loading branch information
Showing
4 changed files
with
27 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,24 @@ | ||
--- | ||
layout: base | ||
--- | ||
{% include episode_navbar.html episode_navbar_title=true %} | ||
{% comment %} | ||
In which language is the current page? Guess from the path: locale="/<lang>/". | ||
Load language tockens for menus {{ data_language }}. Translations need to provide a lang.md file that translates what's under _data/language.yaml | ||
Generate list of episodes and extras for the language shown. - NOTE: _extras need in the permlinks /<language>/page!! | ||
{% endcomment %} | ||
{% if page.path contains "_locale" %} | ||
{% assign locale = page.path | remove: "_locale/" | split: "/" | first | downcase %} | ||
{% else %} | ||
{% assign locale = "en" %} | ||
{% endif %} | ||
{% assign lang_file = locale | append: '.md' %} | ||
{% assign data_language = site.pages | where_exp:"page", "page.path contains 'i18n'" | where_exp:"page", "page.path contains lang_file" | first %} | ||
{% comment %} Start of page {% endcomment %} | ||
{% include episode_navbar.html episode_navbar_title=true language=data_language %} | ||
<article> | ||
{% include episode_title.html %} | ||
{% include episode_overview.html %} | ||
{% include episode_overview.html language=data_language %} | ||
{{content}} | ||
{% include episode_keypoints.html %} | ||
{% include episode_keypoints.html language=data_language %} | ||
</article> | ||
{% include episode_navbar.html episode_navbar_title=false %} | ||
{% include episode_navbar.html episode_navbar_title=false language=data_language %} |