Solitude Docs

Local Search

Local search builds an index during Hexo generation and does not require a hosted search service.

Purpose

Local search builds an index during Hexo generation and does not require a hosted search service.

Install

npm install hexo-generator-search
pnpm add hexo-generator-search
yarn add hexo-generator-search

Theme configuration

search:
  enable: true
  type: local-search

Hexo configuration

search:
  path: search.xml
  field: post
  content: true

Verify

  • Generate the site and confirm the search index file exists.
  • Search for a post title, a tag, and a phrase from the article body.
  • Confirm private drafts are not included in the generated index.