diff options
| author | Dennis Fink | 2026-11-04 18:41:23 +0100 |
|---|---|---|
| committer | Dennis Fink | 2026-11-04 18:41:23 +0100 |
| commit | e7e365c239f766a8d2271c233f16c4df53a9bbb3 (patch) | |
| tree | 3fe4b543aee8f16fb42204d666ca2a17a268c1ac /templates/macros/blog.html | |
| parent | 7b234437e57f75befdec8eaa177bb541654c72a5 (diff) | |
| download | dennisfink.me-e7e365c239f766a8d2271c233f16c4df53a9bbb3.tar.gz dennisfink.me-e7e365c239f766a8d2271c233f16c4df53a9bbb3.zip | |
Improve Pagefind indexing and filtering
This adds publication dates, categories, and tags to Pagefind metadata,
enabling search results to be sorted by date and filtered by category or
tag.
It also excludes tables of contents, post metadata, and footer sections
from search indexing to keep results focused on the actual article
content.
Diffstat (limited to '')
| -rw-r--r-- | templates/macros/blog.html | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/templates/macros/blog.html b/templates/macros/blog.html index c3b5390..09e6a65 100644 --- a/templates/macros/blog.html +++ b/templates/macros/blog.html @@ -1,7 +1,7 @@ {% from "macros/pagination.html" import render_pagination %} {% macro render_toc(toc, maxdepth=2) %} - <nav aria-label="Table of contents"> + <nav aria-label="Table of contents" data-pagefind-ignore> <p>Table of contents</p> <ol> {% for item in toc recursive %} @@ -37,7 +37,7 @@ <h2> <a href="{{ post|url }}" class="u-url p-name">{{ post.title }}</a> </h2> - <dl> + <dl data-pagefind-ignore> {% if post.publication_date %} <div> <dt>Posted:</dt> @@ -86,7 +86,7 @@ <div class="e-content">{{ post.body }}</div> <footer> {% if post.tags %} - <section> + <section data-pagefind-ignore> <ul aria-label="Tags"> <li>Tagged with</li> {% for tag in post.tags %} @@ -101,12 +101,14 @@ </ul> </section> {% endif %} - <section> + <section data-pagefind-ignore> <p>Reply to this post by <a rel="nofollow" href="mailto:me+blog@dennisfink.me?subject=RE: {{ post.title }}">email</a>.</p> </section> {% if post.changelog %} - <section class="changelog" aria-labelledby="changelog-heading"> + <section class="changelog" + aria-labelledby="changelog-heading" + data-pagefind-ignore> <h3 id="changelog-heading">Changelog</h3> <ul> {% for entry in post.changelog.blocks %} |
