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-searchpnpm add hexo-generator-searchyarn add hexo-generator-searchTheme configuration
search:
enable: true
type: local-searchHexo configuration
search:
path: search.xml
field: post
content: trueVerify
- 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.
