feat: Initial search implementation using pagefind.
This commit is contained in:
@@ -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") {
|
||||
|
||||
Reference in New Issue
Block a user