Skip to content
Permalink
Browse files

doc: update README

add an instruction about the declaration order of sitemap module with other nuxt modules (eg. nuxt-i18n)

fix #32
  • Loading branch information...
NicoPennec committed Jan 8, 2019
1 parent 37f3cfb commit eefc7a625474d5316b0ad5e18cf522ceaf70f05e
Showing with 6 additions and 2 deletions.
  1. +6 −2 README.md
@@ -13,13 +13,17 @@
Module based on the awesome [sitemap](https://github.com/ekalinin/sitemap.js) package ❤️

## Setup

- Add `@nuxtjs/sitemap` dependency using yarn or npm to your project

- Add `@nuxtjs/sitemap` module to `nuxt.config.js`
```js
modules: [
'@nuxtjs/sitemap'
]
````
```
> **notice:** If you use other modules (eg. `nuxt-i18n`), always declare the sitemap module at end of array (eg. `modules: ['nuxt-i18n', '@nuxtjs/sitemap']`)
- Add additional options to `sitemap` section of `nuxt.config.js` to override defaults
```js
sitemap: {
@@ -92,7 +96,7 @@ Examples:
module.exports = {
sitemap: {
filter ({ routes, options }){
filter ({ routes, options }) {
if (options.hostname === 'example.com') {
return routes.filter(route => route.locale === 'en')
}

0 comments on commit eefc7a6

Please sign in to comment.
You can’t perform that action at this time.