LocalSearch

Learn how to configure local search for the Solitude theme.

Install Plugin

Install the hexo-generator-search plugin, and modify the theme and Hexo configuration.

Theme Configuration

_config.solitude.yml
# Approximately at lines 856 and 869
search:
  enable: true
  type: local # local / algolia / docsearch
  tags:
    # - Solitude
    # - Hexo

···

  # Local search
  local:
    preload: false
    CDN: # url: search.xml

Hexo Configuration

Add the following configuration at the bottom of your _config.yml. Refer to the plugin's README for specific configuration details.

_config.yml
search:
  path: search.xml
  field: post
  content: true
  template: ./search.xml