{% set _atlasdocs = config.extra.atlasdocs | default({}) %} {# The real content h1 (below) carries the id that toc/permalink assigned it — e.g. for in-page anchors and the "Skip to content" link in main.html. Since that h1 gets stripped out of page.content further down to avoid a duplicate title, its id has to be lifted onto this synthetic one instead, or anything linking to "#page-title-slug" 404s. Split via `_split_get` rather than `.split()`/`| split` directly: zensical's Rust template engine only exposes `split` as a filter (one arg, no maxsplit), while mkdocs' Python/Jinja2 engine only exposes it as a string method — see partials/social.html's split_and_get for the same pattern. #} {% macro _split_get(value, sep, index) %} {%- if value.split is defined -%} {%- set parts = value.split(sep) -%} {%- else -%} {%- set parts = value | split(sep) -%} {%- endif -%} {{- parts[index] -}} {% endmacro %} {% set _h1_id = '' %} {% if '