hexo-generator-sitemap
Version:
Sitemap generator plugin for Hexo
53 lines (40 loc) • 1.51 kB
Markdown
# hexo-generator-sitemap
[](https://github.com/hexojs/hexo-generator-sitemap/actions?query=workflow%3ATester)
[](https://www.npmjs.com/package/hexo-generator-sitemap)
[](https://coveralls.io/r/hexojs/hexo-generator-sitemap?branch=master)
Generate sitemap.
## Install
``` bash
$ npm install hexo-generator-sitemap --save
```
- Hexo 4: 2.x
- Hexo 3: 1.x
- Hexo 2: 0.x
## Options
You can configure this plugin in `_config.yml`.
``` yaml
sitemap:
path:
- sitemap.xml
- sitemap.txt
template: ./sitemap_template.xml
template_txt: ./sitemap_template.txt
rel: false
tags: true
categories: true
```
- **path** - Sitemap path. (Default: sitemap.xml)
- **template** - Custom template path. This file will be used to generate sitemap.xml (See [default xml template](/sitemap.xml))
- **template_txt** - Custom template path. This file will be used to generate sitemap.txt (See [default txt template](/sitemap.txt))
- **rel** - Add [`rel-sitemap`](http://microformats.org/wiki/rel-sitemap) to the site's header. (Default: `false`)
- **tags** - Add site's tags
- **categories** - Add site's categories
## Exclude Posts/Pages
Add `sitemap: false` to the post/page's front matter.
``` yml
title: lorem ipsum
date: 2020-01-02
sitemap: false
```