1
0
Fork 0
mirror of https://github.com/tylernguyen/wiki.git synced 2025-02-05 08:23:14 -06:00
wiki/overrides/partials/post.html

76 lines
2.3 KiB
HTML

<!-- LINK Modifies https://github.com/squidfunk/mkdocs-material/blob/master/src/templates/partials/post.html
MIT License: Copyright (c) 2016-2024 Martin Donath <martin.donath@squidfunk.com>
-->
<!-- Post excerpt -->
<article class="md-post md-post--excerpt">
<!-- Post content -->
<!-- ANCHOR Customization -->
<!-- TODO post.content should be title only! -->
<div class="md-post__content md-typeset">
{{ post.content }}
<!-- NOTE Removed Continue reading link -->
</div>
<header class="md-post__header">
<!-- ANCHOR Customization -->
<!-- NOTE Removed Author Information -->
<!-- Post metadata -->
<div class="md-post__meta md-meta">
<ul class="md-meta__list">
<!-- Post date -->
<li class="md-meta__item">
<!-- SECTION Customization -->
<time datetime="{{ post.config.date.created }}">
{{ post.config.date.created | date }}
</time>
{% if post.config.date.updated %}
<time datetime="{{ post.config.date.updated }}">
(Updated {{ post.config.date.updated | date }})
</time>
{% endif %}
<!-- !SECTION Customization -->
{#- Collapse whitespace -#}
</li>
<!-- Post categories -->
{% if post.categories %}
<li class="md-meta__item">
{{ lang.t("blog.categories.in") }}
{% for category in post.categories %}
<a
href="{{ category.url | url }}"
class="md-meta__link"
>
{{- category.title -}}
</a>
{%- if loop.revindex > 1 %}, {% endif -%}
{% endfor -%}
</li>
{% endif %}
<!-- Post readtime -->
{% if post.config.readtime %}
{% set time = post.config.readtime %}
<li class="md-meta__item">
{% if time == 1 %}
{{ lang.t("readtime.one") }}
{% else %}
{{ lang.t("readtime.other") | replace("#", time) }}
{% endif %}
</li>
{% endif %}
</ul>
<!-- Draft marker -->
{% if post.config.draft %}
<span class="md-draft">
{{ lang.t("blog.draft") }}
</span>
{% endif %}
</div>
</header>
</article>