|
|
6 years ago | |
|---|---|---|
| .. | ||
| demo_output | 6 years ago | |
| lib | 6 years ago | |
| templates | 6 years ago | |
| LICENSE | 6 years ago | |
| README.md | 6 years ago | |
| index.js | 6 years ago | |
| package.json | 6 years ago | |
Generate search data for Hexo 3.0. This plugin is used for generating a search index file, which contains all the neccessary data of your articles that you can use to write a local search engine for your blog. Supports both XML and JSON format output.
$ npm install hexo-generator-search --save
You can configure this plugin in your root _config.yml.
search:
path: search.xml
field: post
content: true
search.xml . If the file extension is .json, the output format will be JSON. Otherwise XML format file will be exported.false, the generated results only cover title and other meta info without mainbody. By default is true.To exclude a certain post or page from being indexed, you can simply insert indexing: false setting at the top of its front-matter, e.g.:
title: "Code Highlight"
date: "2014-03-15 20:17:16"
tags: highlight
categories: Demo
description: "A collection of Hello World applications from helloworld.org."
toc: true
indexing: false
---
Then the generated result will not contain this post or page.
This plugin is used for generating a xml / json file from your Hexo blog that provides data for searching.
After executing hexo g you will get the generated result at your public folder.
You have two choices: