feat: Initial search implementation using pagefind.

This commit is contained in:
2025-04-06 10:40:58 -04:00
parent 6457674de7
commit 573e70a8d2
9 changed files with 104 additions and 21 deletions

View File

@@ -105,7 +105,10 @@ func renderArticle(context: ItemRenderingContext<ArticleMetadata>) -> Node {
div {
renderArticleInfo(context.item)
}
Node.raw(context.item.body)
// Only index the body of the articles for search.
div(customAttributes: ["data-pagefind-body": ""]) {
Node.raw(context.item.body)
}
}
div(class: "border-t border-light pt-8 mt-16") {