Skip to content
Permalink
Browse files

docs: update README

  • Loading branch information...
NicoPennec committed Sep 26, 2019
1 parent 5a7ea28 commit 8d8da42a30ea3bf475ef5bd9c73b4d7606ab223d
Showing with 13 additions and 9 deletions.
  1. +13 −9 README.md
@@ -25,17 +25,21 @@

- [Installation](#installation)
- [Usage](#usage)
- [Sitemap Configuration](#sitemap-configuration)
- [Sitemap Index Configuration](#sitemap-index-configuration)
- [Sitemap Options](#sitemap-options)
- [Sitemap Index Options](#sitemap-index-options)
- [Routes Declaration](#routes-declaration)

## Installation

> npm install @nuxtjs/sitemap --save
```shell
npm install @nuxtjs/sitemap
```

or

> yarn add @nuxtjs/sitemap
```shell
yarn add @nuxtjs/sitemap
```

## Usage

@@ -53,7 +57,7 @@ or
- Add a custom configuration with the `sitemap` property.

You can set a single item of [sitemap](#sitemap-configuration) or [sitemap index](#sitemap-index-configuration) or an array of item:
You can set a single item of [sitemap](#sitemap-options) or [sitemap index](#sitemap-index-options) or an array of item:

```js
// Setup a simple sitemap.xml
@@ -131,11 +135,11 @@ You can set a single item of [sitemap](#sitemap-configuration) or [sitemap index
## Sitemap Options
### `routes` - array or promise function
### `routes` (optional) - array | function
- Default: `[]` or [`generate.routes`](https://nuxtjs.org/api/configuration-generate#routes) value from your `nuxt.config.js`
The `routes` parameter follows the same way than the `generate` [configuration](https://nuxtjs.org/api/configuration-generate).
The `routes` parameter follows the same way than the `generate` [configuration](https://nuxtjs.org/api/configuration-generate#routes).
See as well the [routes declaration](#routes-declaration) examples below.
@@ -263,7 +267,7 @@ The `defaults` parameter set the default options for all routes.
See available options: https://github.com/ekalinin/sitemap.js#usage
## Sitemap Index Configuration
## Sitemap Index Options
### `path` (optional) - string
@@ -279,7 +283,7 @@ Set the `hostname` value to each sitemap linked to its sitemap index.
- Default: `[]`
Array of [sitemap configuration](#sitemap-configuration]) linked to the sitemap index.
Array of [sitemap configuration](#sitemap-options]) linked to the sitemap index.
```js
// nuxt.config.js

0 comments on commit 8d8da42

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