Solitude Docs

DocSearch

DocSearch is designed for documentation sites that qualify for Algolia DocSearch crawling.

Purpose

DocSearch is designed for documentation sites that qualify for Algolia DocSearch crawling.

Install

npm install @docsearch/js
pnpm add @docsearch/js
yarn add @docsearch/js

Theme configuration

search:
  enable: true
  type: docsearch

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.