diff options
| author | Dennis Fink | 2026-11-04 18:47:45 +0100 |
|---|---|---|
| committer | Dennis Fink | 2026-11-04 18:47:45 +0100 |
| commit | 99fe96443fe38685dc7d01f38cf7db9ce2ae5f79 (patch) | |
| tree | 5e7b2dc0d82f1c496078efaa74c620beec19d9e8 /templates | |
| parent | e04012f4dae9bf0ad524c5869cf82f92d307cbae (diff) | |
| download | dennisfink.me-99fe96443fe38685dc7d01f38cf7db9ce2ae5f79.tar.gz dennisfink.me-99fe96443fe38685dc7d01f38cf7db9ce2ae5f79.zip | |
Use date-only values in blog post metadata
This removes hardcoded timestamps and timezone offsets from publication
and modification dates in Open Graph and JSON-LD metadata.
Dates are now formatted as `YYYY-MM-DD`, avoiding the need to specify an
arbitrary time or timezone for date-only information.
Diffstat (limited to '')
| -rw-r--r-- | templates/blog-post.html | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/templates/blog-post.html b/templates/blog-post.html index 10f8f7e..6c74033 100644 --- a/templates/blog-post.html +++ b/templates/blog-post.html @@ -21,13 +21,13 @@ <meta property="article:author" content="https://dennisfink.me/about"> {% if this.publication_date %} <meta property="article:published_time" - content="{{ this.publication_date }}T00:00:00+02:00" + content="{{ this.publication_date | dateformat('yyyy-MM-dd') }}" data-pagefind-meta="date[content]" data-pagefind-sort="date[content]"> {% endif %} {% if latest_change %} <meta property="article:modified_time" - content="{{ latest_change.date }}T00:00:00+02:00"> + content="{{ latest_change.date | dateformat('yyyy-MM-dd') }}"> {% endif %} {% if this.category %} {% set category = site.get("/categories/" + this.category) %} @@ -77,8 +77,8 @@ "headline": {{ this.title | tojson }}, "name": {{ this.title | tojson }}, "description": {{ post_description | tojson }}, - "datePublished": "{{ this.publication_date | dateformat('yyyy-MM-dd') }}T00:00:00Z", - "dateModified": "{{ modified_date | dateformat('yyyy-MM-dd') }}T00:00:00Z", + "datePublished": "{{ this.publication_date | dateformat('yyyy-MM-dd') }}", + "dateModified": "{{ modified_date | dateformat('yyyy-MM-dd') }}", "inLanguage": "en", "author": { "@id": "{{ person_id }}" |
