1
0
mirror of https://github.com/privacyguides/blog.privacyguides.org.git synced 2025-07-12 14:32:37 +00:00

Support post updated date

This commit is contained in:
2022-10-25 12:38:48 -05:00
parent bd0c1dc65f
commit 7b4ef5696c
2 changed files with 16 additions and 2 deletions

View File

@ -2,7 +2,8 @@
## Post Metadata
- `date` (**required**): Post date
- `date` (**required**): Original post date (`YYYY-MM-DD`)
- `updated`: Post update date (`YYYY-MM-DD`)
- `categories`: List of post categories. Allowed categories: `Announcements`, `Opinion`, `Software`, `Hardware`, `Android`, `iOS`, `Linux`, `macOS`, `Windows`, `Qubes OS`, `Providers`
- `authors`: List of post authors. Authors must exist in [`.authors.yml`](/docs/.authors.yml). Only the first author will be displayed on the blog index.
- `links`: Related links shown on post sidebar. May be internal or external links.
@ -14,6 +15,7 @@ Example:
```
---
date: 2021-09-14
updated: 2022-05-10
categories:
- Announcements
authors:

View File

@ -59,12 +59,24 @@
<li class="md-nav__item">
<div class="md-nav__link">
{% include ".icons/material/calendar.svg" %}
<time datetime="{{ page.meta.date }}" class="md-ellipsis">
<time datetime="{{ page.meta.date }}" class="md-ellipsis" title="Original Post Date">
{{- page.meta.date_format -}}
</time>
</div>
</li>
<!-- Updated date -->
{% if page.meta.updated %}
<li class="md-nav__item">
<div class="md-nav__link">
{% include ".icons/material/calendar-edit.svg" %}
<time datetime="{{ page.meta.updated }}" class="md-ellipsis" title="Date Updated">
{{- page.meta.updated.strftime('%B %d, %Y') -}}
</time>
</div>
</li>
{% endif %}
<!-- Page categories -->
{% if page.categories %}
<li class="md-nav__item">