From 2cdb949e3133ed3ee1e5fc5b1ac8e4dda2de67d8 Mon Sep 17 00:00:00 2001 From: Vishnu Sankar <4602725+iamvishnusankar@users.noreply.github.com> Date: Thu, 9 Feb 2023 13:27:39 +0530 Subject: [PATCH 1/2] Improved docs --- README.md | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 40b5d46b..d4082c22 100644 --- a/README.md +++ b/README.md @@ -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) @@ -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 .js` to build command (Example: [custom-config-file](https://github.com/iamvishnusankar/next-sitemap/tree/master/examples/custom-config-file)) @@ -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. From 359a7e120a03ad4a03571d2f07afa2daa10384d4 Mon Sep 17 00:00:00 2001 From: Vishnu Sankar <4602725+iamvishnusankar@users.noreply.github.com> Date: Thu, 9 Feb 2023 13:29:38 +0530 Subject: [PATCH 2/2] Fix links --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d4082c22..d92c2392 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ ## Table of contents -- Getting started +- [Getting started](#getting-started) - [Installation](#installation) - [Create config file](#create-config-file) - [Building sitemaps](#building-sitemaps)