[Hexo] Use hexo-generator-baidu-sitemap plugin to generate Baidu sitemap.xml automatically in Hexo
hexo-generator-baidu-sitemap
Hexo is a fast, simple & powerful blog framework. It use plugins to provide features powerful APIs for limitless extensibility. Various plugins are available to support most template engines (EJS, Pug, Nunjucks, and many others). Easily integrate with existing NPM packages (Babel, PostCSS, Less/Sass, etc).
hexo-generator-baidu-sitemap
plugin will generate Baidu sitemap.xml files for Hexo
pages, posts, categories, tags.
Installation
Use npm
to install hexo-generator-baidu-sitemap
package.
1 | npm install hexo-generator-baidu-sitemap --save |
Configuration
It will generate baidusitemap.xml
in the public folder by default after hexo-generator-baidu-sitemap
installation.
You can configure this plugin in ./_config.yml.
1 | baidusitemap: |
The follow is the options:
- path - Sitemap path. (Default: baidusitemap.xml)
Finally, you can visit <Your Site Url>/baidusitemap.xml
in the browser, and check whether the baidusitemap.xml
works correctly after Hexo restarted or regenerated.