Skip to content

Support Pagefind for search #84

@veselosky

Description

@veselosky

Pagefind is a tool that adds full text search for static sites. It pre-generates an index and includes search box that loads partial chunks of the index to conduct searches in the browser with JavaScript. Pagefind indexes static HTML files after they are generated. It can be configured by including certain markup in pages.

  • Create an include component with the search UI (see the docs).
  • Create a new header block that includes the search UI
  • Modify the default templates to add the data-pagefind-body attribute to the main content block for articles and pages, and the precontent block for sections and home pages.
  • Add data-pagefind-meta attributes to identify the title, image, image_alt, section (for articles) and updated date.
  • Add data-pagefind-filter attributes to allow filtering by author, tags, and section.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions