{% set_global current_depth = depth + 1 %}
{% else %}
{% set file_cls = "" %}
{% if clean_name is ending_with(pat=".rs") %}{% set file_cls = " file-rust" %}
{% elif clean_name is ending_with(pat=".toml") or clean_name is ending_with(pat=".kdl") or clean_name is ending_with(pat=".json") or clean_name is ending_with(pat=".yaml") or clean_name is ending_with(pat=".yml") %}{% set file_cls = " file-config" %}
{% elif clean_name is ending_with(pat=".md") or clean_name is ending_with(pat=".txt") %}{% set file_cls = " file-doc" %}
{% endif %}
{% set chunks = body | split(pat="===") %}
{% for chunk in chunks %}
{% if chunk | trim | length > 0 %}
{% set lines = chunk | split(pat="\n") %}
{% set title = lines[0] | trim %}
{% set content = chunk | replace(from=lines[0], to="") | trim %}
{{ content | markdown | safe }}
{% endif %}
{% endfor %}
{% endcomponent tabs %}
{% component cards() %}
{% set lines = body | split(pat="\n") %}
{% for line in lines %}
{% if line | trim | length > 0 %}
{% set trimmed = line | trim | regex_replace(pattern="^-\\s*", rep="") | trim %}
{% set parts = trimmed | split(pat=":") %}
{% set raw_title = parts[0] | trim %}
{% set title_part = raw_title | regex_replace(pattern="^(nf-[a-zA-Z0-9_-]+)\\s+", rep=" ") %}
{% set desc_part = "" %}
{% if parts | length > 1 %}
{% set desc_part = parts[1] | trim %}
{% endif %}