{# Hand-authored, not derived from weights. Every page must appear here exactly once, in both languages. An unlinked page is an orphan, and the previous sidebar quietly stranded four of them (usage/supported/{mobile,cli, ai_context_coverage} and usage/cli_commands). `href` is language-neutral. lang_prefix turns it into /ko/... on Korean pages, and page.url already carries that prefix, so the current-page test has to compare against the prefixed form. #} {% macro navlink(href, key) %}
  • {{ key | t }}
  • {% endmacro %} {# Only the branch holding the current page starts open. Sixty-one links expanded at once is a list, not a navigation aid. This is computed here rather than in nav.js so the sidebar never renders fully open and then snaps shut on load.
    / rather than a div plus a click handler: the disclosure works with JavaScript disabled (otherwise a reader reaches 6 of 61 links), the summary is focusable and toggles on Enter and Space for free, and the browser exposes the expanded state to assistive tech without an aria-expanded we would have to keep in sync. Crinja has no `in` operator and no `startswith` test, so "is this URL under this prefix" is written as "does removing the prefix change the string". taxonomy_term.html uses the same trick. #} {% set u = page.url %} {% set p = lang_prefix %} {% set g_started = (u | replace(p ~ "/get_started/", "")) != u %} {% set g_usage = (u | replace(p ~ "/usage/", "")) != u %} {% set g_dev = (u | replace(p ~ "/development/", "")) != u %} {% set in_res = (u | replace(p ~ "/resources/", "")) != u %} {% set in_com = (u | replace(p ~ "/community/", "")) != u %} {% set g_res = in_res or in_com %} {% set s_supported = (u | replace(p ~ "/usage/supported/", "")) != u %} {% set s_formats = (u | replace(p ~ "/usage/output_formats/", "")) != u %} {% set s_passive = (u | replace(p ~ "/usage/passive_scan/", "")) != u %} {% set s_more = (u | replace(p ~ "/usage/more_features/", "")) != u %} {% set s_ai = (u | replace(p ~ "/usage/ai_providers/", "")) != u %} {% set s_config = (u | replace(p ~ "/usage/configurations/", "")) != u %}