Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add sitemap for home/docs. #363

Merged
merged 4 commits into from
Feb 27, 2025
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"eslint-plugin-simple-import-sort": "^10.0.0",
"eslint-plugin-vitest": "^0.5.4",
"prettier": "^3.0.0",
"turbo": "^2.3.3",
"turbo": "^2.4.4",
"typescript": "^5.7.2"
}
}
107 changes: 73 additions & 34 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions website/docs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,5 @@ yarn-error.log*
# typescript
*.tsbuildinfo
next-env.d.ts

public/sitemap*.xml
2 changes: 2 additions & 0 deletions website/docs/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
//.npmrc
enable-pre-post-scripts=true
5 changes: 5 additions & 0 deletions website/docs/next-sitemap.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/** @type {import('next-sitemap').IConfig} */
module.exports = {
siteUrl: "https://gensx.com/docs",
generateRobotsTxt: false,
};
3 changes: 2 additions & 1 deletion website/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scripts": {
"build": "next build",
"dev": "next dev --turbopack -p 4000",
"postbuild": "pagefind --site .next/server/app --output-path public/_pagefind",
"postbuild": "pagefind --site .next/server/app --output-path public/_pagefind && next-sitemap",
"start": "next start",
"lint": "next lint",
"lint:fix": "next lint --fix",
Expand All @@ -15,6 +15,7 @@
"@tailwindcss/postcss": "^4.0.6",
"@vercel/analytics": "^1.5.0",
"next": "^15.1.6",
"next-sitemap": "^4.2.3",
"nextra": "^4.2.12",
"nextra-theme-docs": "^4.2.12",
"postcss": "^8",
Expand Down
3 changes: 3 additions & 0 deletions website/home/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,6 @@ yarn-error.log*
# typescript
*.tsbuildinfo
next-env.d.ts

public/sitemap*.xml
public/robots.txt
2 changes: 2 additions & 0 deletions website/home/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
//.npmrc
enable-pre-post-scripts=true
9 changes: 9 additions & 0 deletions website/home/next-sitemap.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/** @type {import('next-sitemap').IConfig} */
module.exports = {
siteUrl: "https://gensx.com",
generateRobotsTxt: true,
exclude: ["/blog/_*"],
robotsTxtOptions: {
additionalSitemaps: ["https://gensx.com/docs/sitemap.xml"],
},
};
4 changes: 3 additions & 1 deletion website/home/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"start": "next start",
"lint": "next lint",
"lint:fix": "next lint --fix",
"format": "prettier --write ."
"format": "prettier --write .",
"postbuild": "next-sitemap"
},
"dependencies": {
"@radix-ui/react-dialog": "^1.1.6",
Expand All @@ -30,6 +31,7 @@
"lucide-react": "^0.474.0",
"motion": "^12.3.1",
"next": "^15.1.7",
"next-sitemap": "^4.2.3",
"next-themes": "^0.4.4",
"prismjs": "^1.29.0",
"react": "^19.0.0",
Expand Down
Loading