{#-
Override Material/Zensical content actions so the raw source action becomes
a copy-markdown action with a raw markdown fallback href.
-#}
{% if page.edit_url %}
{% if "content.action.edit" in features %}
{% set icon = config.theme.icon.edit or "material/file-edit-outline" %}
{% include ".icons/" ~ icon ~ ".svg" %}
{% endif %}
{% if "content.action.view" in features %}
{% if "/blob/" in page.edit_url %}
{% set part = "/blob/" %}
{% else %}
{% set part = "/edit/" %}
{% endif %}
{% set markdown_url = page.edit_url | replace(part, "/raw/") %}
Copy Markdown
{% endif %}
{% endif %}