diff --git a/_config.yml b/_config.yml index e00de3f9..a53e4539 100644 --- a/_config.yml +++ b/_config.yml @@ -72,6 +72,20 @@ defaults: announcement: true # Enable or disable the announcements. +collections: + starter: + output: true + sort_by: order + guide: + output: true + sort_by: order + advanced: + output: true + sort_by: order + resources: + output: true + sort_by: order + # Build settings plugins: @@ -88,7 +102,7 @@ kramdown: hard_wrap: false syntax_highlighter: rouge -exclude: +exclude: - [uk/CHANGELOG.md] - vendor/bundle - node_modules/ diff --git a/_includes/bottom-navigation.html b/_includes/bottom-navigation.html new file mode 100644 index 00000000..10ce134c --- /dev/null +++ b/_includes/bottom-navigation.html @@ -0,0 +1,46 @@ +{% assign current_menu = page.menu %} +{% assign current_lang = page.lang %} + +{% if current_menu and current_lang %} + + {% assign all_pages_in_menu = site.pages | where: "menu", current_menu %} + {% assign lang_specific_pages = all_pages_in_menu | where: "lang", current_lang %} + + {% assign sorted_pages = lang_specific_pages | sort: "order" %} + + {% for doc in sorted_pages %} + {% if doc.path == page.path %} + {% assign current_index = forloop.index0 %} + {% break %} + {% endif %} + {% endfor %} + + {% if current_index != nil %} + {% assign prev_index = current_index | minus: 1 %} + {% if prev_index >= 0 %} + {% assign prev_page = sorted_pages[prev_index] %} + {% endif %} + + {% assign next_index = current_index | plus: 1 %} + {% if next_index < sorted_pages.size %} + {% assign next_page = sorted_pages[next_index] %} + {% endif %} + {% endif %} + + {% if prev_page or next_page %} + + {% endif %} + +{% endif %} \ No newline at end of file diff --git a/_includes/header.html b/_includes/header.html index b0006059..190e035c 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -176,7 +176,7 @@