{# One entry of the search page for each part of a page: what comes before its first heading, then each "## heading" with what follows it. The text is the page's own, tags taken out. #} {% macro entries(page, group) %} {% set parts = page.content | split(pat='

{{ page.title }}{{ group }}

{{ page.description }} {{ part | striptags | trim | safe }}

{% else %} {% set anchor = part | split(pat='"') | first %} {% set head = part | split(pat="

") | first %} {% set heading = head | split(pat='">') | slice(start=1) | join(sep='">') | striptags | trim %} {% set body = part | split(pat="") | slice(start=1) | join(sep="") | striptags | trim %}
  • {{ heading | safe }}{{ group }} ยท {{ page.title }}

    {{ body | safe }}

  • {% endif %} {% endfor %} {% endmacro entries %}