{###################################### menu widget Provide the widget with a content page that contains your menu: {{ widgets::menu(content="_common/menus/main.md") }} Separate entries with a thematic break: either ---, ~~~, ___ or
tags in the menu. ######################################} {% macro menu(content) %} {% endmacro menu %} {%- macro i18n(key) -%} {{ trans(key=key, lang=lang) }} {%- endmacro i18n -%} {%- macro i18n_page(page) -%} {% if lang == "en" %}{{ page }} {%- else -%} {%- set parts = page | split(pat=".md") -%} {%- for part in parts -%} {%- if part and not loop.first -%}.md{%- endif -%} {%- if not loop.last -%}{{ part }}{%- endif -%} {%- endfor -%} .{{ lang }}.md {%- endif -%} {%- endmacro i18n_page -%}