{#-
Zensical has no counterpart to the `social` plugin of Material for MkDocs,
which rendered a card per page. Until it does, every page points at the same
card, `docs/assets/social-card.png`. Title and description are still per page.
Before touching this file, check whether Zensical has gained social card
support in the meantime. If it has, drop this partial, `main.html`, the
`extends` in `home.html` and the card asset, and configure the plugin instead.
-#}
{#- Zensical leaves `page.is_homepage` unset, the home page is the one without a URL -#}
{% if not page.url %}
{% set title = config.site_name %}
{% elif page.meta and page.meta.title %}
{% set title = page.meta.title ~ " - " ~ config.site_name %}
{% elif page.title %}
{% set title = page.title | striptags ~ " - " ~ config.site_name %}
{% else %}
{% set title = config.site_name %}
{% endif %}
{% if page.meta and page.meta.description %}
{% set description = page.meta.description %}
{% else %}
{% set description = config.site_description %}
{% endif %}
{#- Under mike, `site_url` carries the version prefix and loses its trailing slash -#}
{% set base = config.site_url | d("", true) %}
{% set card = (base ~ "/assets/social-card.png") | replace("//assets", "/assets") %}
{% if page.canonical_url %}
{% endif %}