{#- A documentation page as a publication spread: a masthead carrying the page title, then the reading body. The homepage composes itself from its partials and the features in index.md. -#} {% include "partials/actions.html" %} {% if page.is_homepage or (nav.homepage and page.url == nav.homepage.url) %} {#- The runnable example of docs/index.md sits between two markers. partials/home-examples.html shows it after the features, and the rest of the page keeps everything around it. #} {%- set home_content = page.content %} {%- set hero_example = "" %} {%- if "" in home_content %} {%- set before_example = home_content | split("") | list %} {%- set after_example = before_example[1] | split("") | list %} {#- Markdown wraps the block's editor in a paragraph, which cannot hold it. #} {%- set hero_example = after_example[0] | replace("

", "") | replace("

", "") %} {%- set home_content = before_example[0] ~ after_example[1] %} {%- endif %}
{% include "partials/home.html" %} {#- The examples are the block of docs/index.md, laid out by the markdown extension in scripts/docs_markdown. The rest of that page (its title) is kept for the page's outline. #} {%- if "" in home_content %}
{{ home_content | replace("", '
02Features
') | replace("", '
') | safe }}
{%- else %}
{{ home_content | safe }}
{%- endif %} {% include "partials/home-examples.html" %} {% include "partials/home-explore.html" %}
{% else %}
{% if "{{ page.title | d(config.site_name, true) }}
{{ page.content }}
{% else %} {{ page.content | replace("", "
") | safe }}
{% endif %} {% endif %} {% include "partials/tags.html" %} {% include "partials/source-file.html" %} {% include "partials/feedback.html" %} {% include "partials/comments.html" %}