{# Hwaro 0.17 exposes no source-path field on `page`, so derive the GitHub edit target from page.url. Strip the /ko prefix, choose the .ko.md/.md suffix, and use the slash count of the (de-prefixed) path to tell a section _index (2 slashes) from a regular page (3+). Crinja has no substring `in`, no char-`trim`, and no open/negative slices, so the trailing slash is turned into the suffix with a sentinel replace. #} {% set is_ko = page_language == "ko" %} {% set rel = page.url %}{% if is_ko %}{% set rel = page.url | replace("/ko/", "/") %}{% endif %} {% set suffix = ".md" %}{% if is_ko %}{% set suffix = ".ko.md" %}{% endif %} {% set nslash = (rel | length) - (rel | replace("/", "") | length) %} {% set src = "/index" ~ suffix %} {% if nslash == 2 %}{% set src = rel ~ "_index" ~ suffix %}{% elif nslash > 2 %}{% set src = (rel ~ "EOP") | replace("/EOP", suffix) %}{% endif %} {% if has_source %} {% endif %}
ESC
{{ auto_includes_js }}