{#
Shared template (text-forge).
Content repos may override by replacing their symlink/file in mkdocs/overrides,
or by switching theme.custom_dir.
Configuration is provided by text-forge plugin:
- text-forge:
source_file_published_title: "Опубликовано"
#}
{# ---------------------------------------------------------------------- #}
{% macro render_created(date) %}
{% include ".icons/material/clock-plus-outline.svg" %}
{{ date }}
{% endmacro %}
{% macro render_published(date) %}
{% include ".icons/material/clock-check-outline.svg" %}
{{ date }}
{% endmacro %}
{% macro render_updated(date) %}
{% include ".icons/material/clock-edit-outline.svg" %}
{{ date }}
{% endmacro %}
{% macro render_authors(authors) %}
{% set git_authors = config.plugins["git-authors"] %}
{% if authors | length == 1 %}
{% include ".icons/material/account.svg" %}
{% else %}
{% include ".icons/material/account-group.svg" %}
{% endif %}
{% endmacro %}
{% macro render_committers_github(title) %}
{% include ".icons/material/github.svg" %}
{{ title }}
{% endmacro %}
{% macro render_committers_gitlab(title) %}
{% include ".icons/material/gitlab.svg" %}
{{ title }}
{% endmacro %}
{% macro render_committers(authors) %}
{% if committers_source == "gitlab" %}
{{ render_committers_gitlab("GitLab") }}
{% else %}
{{ render_committers_github("GitHub") }}
{% endif %}
{% endmacro %}
{% if page.meta %}
{% if page.meta.created %}
{% set created = page.meta.created %}
{% elif page.meta.git_creation_date_localized %}
{% set created = page.meta.git_creation_date_localized %}
{% endif %}
{% if page.meta.published %}
{% set published = page.meta.published %}
{% endif %}
{% if page.meta.git_revision_date_localized %}
{% set updated = page.meta.git_revision_date_localized %}
{% elif page.meta.updated or page.meta.revision_date %}
{% set updated = page.meta.updated or page.meta.revision_date %}
{% endif %}
{% endif %}
{% if updated or published or created or git_info or committers %}
{% endif %}