Skip to content

Commit

Permalink
Added file info
Browse files Browse the repository at this point in the history
  • Loading branch information
iamvishnusankar committed Mar 2, 2023
1 parent 355a89f commit 3d78e71
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -311,6 +311,8 @@ Here's a sample script to generate index-sitemap on server side.
<details>
<summary>1. Index sitemaps (app directory)</summary>
Create `app/server-sitemap-index.xml/route.ts` file.
```ts
// app/server-sitemap-index.xml/route.ts
import { getServerSideSitemapIndex } from 'next-sitemap'
@@ -331,6 +333,8 @@ export async function GET(request: Request) {
<details>
<summary>2. Index sitemap (pages directory) (legacy)</summary>
Create `pages/server-sitemap-index.xml/index.tsx` file.
```ts
// pages/server-sitemap-index.xml/index.tsx
import { getServerSideSitemapIndexLegacy } from 'next-sitemap'

0 comments on commit 3d78e71

Please sign in to comment.