Skip to content

Commit 809fe76

Browse files
SItemap generation
1 parent 973965c commit 809fe76

File tree

6 files changed

+232
-2
lines changed

6 files changed

+232
-2
lines changed

docs-v2/next-sitemap.config.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/** @type {import('next-sitemap').IConfig} */
2+
module.exports = {
3+
siteUrl: "https://pipedream.com/docs",
4+
generateRobotsTxt: true,
5+
outDir: "./public",
6+
generateIndexSitemap: false,
7+
// Add a trailing slash to all URLs
8+
trailingSlash: true,
9+
// Exclude URLs matching these patterns
10+
exclude: [
11+
"/hidden/*",
12+
"/deprecated/*",
13+
"/api-docs-server",
14+
],
15+
robotsTxtOptions: {
16+
additionalSitemaps: [
17+
"https://pipedream.com/sitemap.xml", // If you have a main site sitemap, include it here
18+
],
19+
policies: [
20+
{
21+
userAgent: "*",
22+
allow: "/",
23+
},
24+
],
25+
},
26+
};

docs-v2/package-lock.json

Lines changed: 49 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs-v2/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"scripts": {
77
"dev": "next dev",
88
"build": "next build",
9+
"postbuild": "next-sitemap",
910
"start": "next start"
1011
},
1112
"packageManager": "[email protected]",
@@ -33,6 +34,7 @@
3334
"devDependencies": {
3435
"@types/node": "18.11.10",
3536
"autoprefixer": "^10.4.19",
37+
"next-sitemap": "^4.2.3",
3638
"postcss": "^8.4.40",
3739
"prettier": "^3.3.3",
3840
"tailwindcss": "^3.4.7",

docs-v2/public/robots.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# *
2+
User-agent: *
3+
Allow: /
4+
5+
# Host
6+
Host: https://pipedream.com/docs
7+
8+
# Sitemaps
9+
Sitemap: https://pipedream.com/docs/sitemap.xml
10+
Sitemap: https://pipedream.com/sitemap.xml

0 commit comments

Comments
 (0)