diff options
| author | Dennis Fink | 2026-07-14 19:38:31 +0200 |
|---|---|---|
| committer | Dennis Fink | 2026-07-14 19:38:31 +0200 |
| commit | 5c65f40bbca27dfb26e75cb027f287b2aa78cd3a (patch) | |
| tree | b21a1d58ee9efde63f7a5a1f7545b2c6bd03a4ef /templates/base.html | |
| parent | 206400382a5c111842fd77c8418ad94a85f2da99 (diff) | |
| download | dennisfink.me-5c65f40bbca27dfb26e75cb027f287b2aa78cd3a.tar.gz dennisfink.me-5c65f40bbca27dfb26e75cb027f287b2aa78cd3a.zip | |
Add structured data and microformats
This adds JSON-LD for the site, author, blog, and individual blog posts, so
search engines and other consumers can understand the blog structure more
clearly.
It also adds Microformats2 classes to blog posts and the about page, keeping
machine-readable author, post, category, date, and content data attached to the
visible HTML.
Diffstat (limited to 'templates/base.html')
| -rw-r--r-- | templates/base.html | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/templates/base.html b/templates/base.html index e2c145f..024907d 100644 --- a/templates/base.html +++ b/templates/base.html @@ -26,6 +26,44 @@ content="Muted green Hilbert-curve logo beside the words “Still Thinking About It” on a dark blue background"> <meta name="fediverse:creator" content="@me@dennisfink.me"> {% endblock meta %} + {% block json_ld %} + <script type="application/ld+json"> + { + "@context": "https://schema.org", + "@graph": [{ + "@type": "Person", + "@id": "{{ '/about' | url(absolute=True, external=True) }}#person", + "name": "Dennis Fink", + "url": "{{ '/about' | url(absolute=True, external=True) }}", + "sameAs": [ + "https://social.dennisfink.me/@me" + ], + "gender": "Male" + }, { + "@type": "WebSite", + "@id": "{{ '/' | url(absolute=True, external=True) }}#website", + "name": "{{ bag('blog.name') }}", + "url": "{{ '/' | url(absolute=True, external=True) }}", + "author": { + "@id": "{{ '/about' | url(absolute=True, external=True) }}#person" + }, + "publisher": { + "@id": "{{ '/about' | url(absolute=True, external=True) }}#person" + }, + "inLanguage": "en", + "image": { + "@type": "ImageObject", + "@id": "{{ '/' | url(absolute=True, external=True) }}#website-image", + "url": "{{ '/static/images/logo.png' | url(absolute=True, external=True) }}", + "caption": "Still Thinking About It Logo", + "encodingFormat": "image/png", + "width": "800px", + "height": "800px" + } + }] + } + </script> + {% endblock %} {% block styles %} <link rel="stylesheet" type="text/css" |
