{# MkDocs template for PMM Builds HTML without outer html tags for wrapping within Drupal container #} {%- set url_root = config.site_url %} {%- set site_name = config.site_name %} {%- set page_title = page.title %} {%- set release = config.extra.release %} {# toctree() section level start and limit #} {% set default_level = 1 %} {% set max_level = 4 %} {#### Horizontal navigation bars above and below main content (Home, prev, next) #} {%- macro relbar() %} {% endmacro %} {#### 'Edit this page' and 'Report issue' links #} {% macro edit_report() %} {% if page and page.edit_url %}
{% endif %} {% endmacro %} {#### 'Last updated' (and later, other info such as author, tester) #} {% macro last_updated() %}
{% endmacro %} {#### Contents of left column navigation bar #} {% macro sidebar() %}
{@ product_logo @} {@ product_pdf_download @} {{ version_menu() }}

Table Of Contents

{{ toctree(nav, default_level) }} {{ relations() }} {@ product_series @}
{% endmacro %} {### Left nav column previous/next links #} {% macro relations() %} {% if page.previous_page %}

Previous page

{{ page.previous_page.title|e }}

{% endif %} {% if page.next_page %}

Next page

{{ page.next_page.title|e }}

{% endif %} {% endmacro %} {# Used by toctree() MkDocs doesn't allow a section link. Example, in mkdocs.yaml: nav: - SECTION TITLE: - intro: dir/index.md - another: dir/section.md The toctree will render without a link for 'SECTION TITLE', as it doesn't have a file. 'SECTION TITLE' is just a cosmetic label. To match Sphinx's behaviour, this macro detects special section labels as 'TITLE=path' (splitting on the equals sign). The new nav element would then be: nav: - SECTION TITLE=/dir/: - intro: dir/index.md - another: dir/section.md This macro will put a link to /dir/ for the toc entry 'SECTION TITLE'. If there is not an index.md file in the subdir, link to a file with its .html extension. nav: - SECTION TITLE=/dir/myindex.html: - intro: dir/index.md - another: dir/section.md #} {%- macro navi(item, class, close) %}
  • {%- if item.url %} {{ item.title }} {%- else %} {{ item.title }} {% endif %} {%- if close %}
  • {% endif %} {% endmacro %} {# Table of contents for left nav column #} {% macro toctree(n, level) %} {% if level <= max_level %} {% endif %} {% endmacro %} {# Inserts script items from mkdocs.yml #} {%- macro script() %} {%- for scriptfile in config.extra_javascript %} {% endfor %} {% endmacro %} {# Inserts CSS files from mkdocs.yml #} {%- macro css() %} {%- for cssfile in config.extra_css %} {%- endfor %} {% endmacro %} {%- macro metatags() %} {# TODO #} {% endmacro %} {% macro version_menu() %}
    {% endmacro %} {# Layout for content as hosted by Drupal (no outer html tag) #} {# NOTE: title and head are ignored by Drupal's container #} {{ site_name|e }}{% if page_title %} — {{ page_title|striptags|e }}{% endif %} {{ metatags() }} {{ script() }} {% if page.next_page %} {% endif %} {% if page.previous %} {% endif %} {{ css() }} {{ script() }}
    {{ relbar() }} {{ edit_report() }}
    {{ page.content }}
    {{ last_updated() }} {{ relbar() }}
    {{ sidebar() }}