-
-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
43 changed files
with
2,961 additions
and
2,100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time. | ||
# | ||
# You can adjust the behavior by modifying this file. | ||
# For more information, see: | ||
# https://github.com/actions/stale | ||
name: Mark stale issues and pull requests | ||
|
||
on: | ||
schedule: | ||
- cron: '28 4 * * *' | ||
|
||
jobs: | ||
stale: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
pull-requests: write | ||
|
||
steps: | ||
- uses: actions/stale@v7 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
stale-issue-message: 'Closing this issue due to inactivity.' | ||
stale-pr-message: 'Closing this PR due to inactivity. ' | ||
stale-issue-label: 'no-issue-activity' | ||
stale-pr-label: 'no-pr-activity' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,3 +68,4 @@ junit.xml | |
tsconfig.tsbuildinfo | ||
**/public | ||
**/public | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: 3.1$(rev:.r) | ||
name: 4.0$(rev:.r) | ||
trigger: | ||
branches: | ||
include: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
## 4.0.x | ||
|
||
v4.0.x added support for next13.2+ `appDir` via [Custom Route Handlers](https://nextjs.org/blog/next-13-2#custom-route-handlers) | ||
|
||
#### API Changes | ||
|
||
Generating dynamic/server-side sitemaps | ||
|
||
- `getServerSideSitemapIndex`: Generates index sitemaps based on urls provided and returns application/xml response. Supports next13+ route.{ts,js} file. | ||
|
||
- To continue using inside pages directory, import `getServerSideSitemapIndexLegacy` instead. | ||
|
||
- `getServerSideSitemap`: Generates sitemap based on field entires and returns application/xml response. Supports next13+ route.{ts,js} file. | ||
|
||
- To continue using inside pages directory, import `getServerSideSitemapLegacy` instead. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
examples/app-dir/app/(sitemaps)/server-sitemap-index.xml/route.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/* eslint-disable @typescript-eslint/no-unused-vars */ | ||
import { getServerSideSitemapIndex } from 'next-sitemap' | ||
|
||
export async function GET(request: Request) { | ||
// Method to source urls from cms | ||
// const urls = await fetch('https//example.com/api') | ||
|
||
return getServerSideSitemapIndex([ | ||
'https://example.com/path-1.xml', | ||
'https://example.com/path-2.xml', | ||
]) | ||
} |
22 changes: 22 additions & 0 deletions
22
examples/app-dir/app/(sitemaps)/server-sitemap.xml/route.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* eslint-disable @typescript-eslint/no-unused-vars */ | ||
import { getServerSideSitemap } from 'next-sitemap' | ||
|
||
export async function GET(request: Request) { | ||
// Method to source urls from cms | ||
// const urls = await fetch('https//example.com/api') | ||
|
||
return getServerSideSitemap([ | ||
{ | ||
loc: 'https://example.com', | ||
lastmod: new Date().toISOString(), | ||
// changefreq | ||
// priority | ||
}, | ||
{ | ||
loc: 'https://example.com/dynamic-path-2', | ||
lastmod: new Date().toISOString(), | ||
// changefreq | ||
// priority | ||
}, | ||
]) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.