Skip to content

Commit

Permalink
Improved docs
Browse files Browse the repository at this point in the history
  • Loading branch information
iamvishnusankar committed Feb 9, 2023
1 parent 00460d4 commit 2cdb949
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
- [Installation](#installation)
- [Create config file](#create-config-file)
- [Building sitemaps](#building-sitemaps)
- [Custom config file](#custom-config-file)
- [Building sitemaps with pnpm](#building-sitemaps-with-pnpm)
- [Index sitemaps](#index-sitemaps-optional)
- [Splitting large sitemap into multiple files](#splitting-large-sitemap-into-multiple-files)
- [Configuration Options](#configuration-options)
Expand Down Expand Up @@ -59,14 +61,7 @@ Add next-sitemap as your postbuild script
}
```

### Building sitemaps with pnpm

When using pnpm you need to create a `.npmrc` file in the root of your project if you want to use a postbuild step:

```
//.npmrc
enable-pre-post-scripts=true
```
#### Custom config file

You can also use a custom config file instead of `next-sitemap.config.js`. Just pass `--config <your-config-file>.js` to build command (Example: [custom-config-file](https://github.com/iamvishnusankar/next-sitemap/tree/master/examples/custom-config-file))

Expand All @@ -77,6 +72,15 @@ You can also use a custom config file instead of `next-sitemap.config.js`. Just
}
```

#### Building sitemaps with pnpm

When using pnpm you need to create a `.npmrc` file in the root of your project if you want to use a postbuild step:

```
//.npmrc
enable-pre-post-scripts=true
```

## Index sitemaps (Optional)

📣 From `next-sitemap` v2.x onwards, `sitemap.xml` will be [Index Sitemap](https://developers.google.com/search/docs/advanced/sitemaps/large-sitemaps). It will contain urls of all other generated sitemap endpoints.
Expand Down

0 comments on commit 2cdb949

Please sign in to comment.