From 14958f7501385fc01d3d3503b26f4ff9992882c4 Mon Sep 17 00:00:00 2001 From: dyzulk <66510723+dyzulk@users.noreply.github.com> Date: Fri, 9 Jan 2026 16:09:50 +0700 Subject: [PATCH] feat: implement automatic sitemap generation --- next-sitemap.config.js | 6 +++++ package-lock.json | 53 ++++++++++++++++++++++++++++++++++++++++++ package.json | 2 ++ public/robots.txt | 9 +++++++ public/sitemap.xml | 20 ++++++++++++++++ 5 files changed, 90 insertions(+) create mode 100644 next-sitemap.config.js create mode 100644 public/robots.txt create mode 100644 public/sitemap.xml diff --git a/next-sitemap.config.js b/next-sitemap.config.js new file mode 100644 index 0000000..428fbc9 --- /dev/null +++ b/next-sitemap.config.js @@ -0,0 +1,6 @@ +/** @type {import('next-sitemap').IConfig} */ +module.exports = { + siteUrl: 'https://docs.trustlab.dyzulk.com', + generateRobotsTxt: true, + generateIndexSitemap: false, +} diff --git a/package-lock.json b/package-lock.json index 02bc745..321bcd3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,6 +22,7 @@ "@types/node": "^20.0.0", "@types/react": "^18.2.0", "autoprefixer": "^10.4.23", + "next-sitemap": "^4.2.3", "postcss": "^8.5.6", "tailwindcss": "^3.4.17", "typescript": "^5.0.0" @@ -55,6 +56,13 @@ "integrity": "sha512-s3jaWicZd0pkP0jf5ysyHUI/RE7MHos6qlToFcGWXVp+ykHOy77OUMrfbgJ9it2C5bow7OIQwYYaHjk9XlBQ2A==", "license": "MIT" }, + "node_modules/@corex/deepmerge": { + "version": "4.0.43", + "resolved": "https://registry.npmjs.org/@corex/deepmerge/-/deepmerge-4.0.43.tgz", + "integrity": "sha512-N8uEMrMPL0cu/bdboEWpQYb/0i2K5Qn8eCsxzOmxSggJbbQte7ljMRoXm917AbntqTGOzdTu+vP3KOOzoC70HQ==", + "dev": true, + "license": "MIT" + }, "node_modules/@headlessui/react": { "version": "1.7.19", "resolved": "https://registry.npmjs.org/@headlessui/react/-/react-1.7.19.tgz", @@ -6369,6 +6377,16 @@ "node": ">= 0.6" } }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/mri": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", @@ -6544,6 +6562,41 @@ "react-dom": ">=16.0.0" } }, + "node_modules/next-sitemap": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/next-sitemap/-/next-sitemap-4.2.3.tgz", + "integrity": "sha512-vjdCxeDuWDzldhCnyFCQipw5bfpl4HmZA7uoo3GAaYGjGgfL4Cxb1CiztPuWGmS+auYs7/8OekRS8C2cjdAsjQ==", + "dev": true, + "funding": [ + { + "url": "https://github.com/iamvishnusankar/next-sitemap.git" + } + ], + "license": "MIT", + "dependencies": { + "@corex/deepmerge": "^4.0.43", + "@next/env": "^13.4.3", + "fast-glob": "^3.2.12", + "minimist": "^1.2.8" + }, + "bin": { + "next-sitemap": "bin/next-sitemap.mjs", + "next-sitemap-cjs": "bin/next-sitemap.cjs" + }, + "engines": { + "node": ">=14.18" + }, + "peerDependencies": { + "next": "*" + } + }, + "node_modules/next-sitemap/node_modules/@next/env": { + "version": "13.5.11", + "resolved": "https://registry.npmjs.org/@next/env/-/env-13.5.11.tgz", + "integrity": "sha512-fbb2C7HChgM7CemdCY+y3N1n8pcTKdqtQLbC7/EQtPdLvlMUT9JX/dBYl8MMZAtYG4uVMyPFHXckb68q/NRwqg==", + "dev": true, + "license": "MIT" + }, "node_modules/next-themes": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/next-themes/-/next-themes-0.2.1.tgz", diff --git a/package.json b/package.json index c393a11..55b5293 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "scripts": { "dev": "next dev -p 3001", "build": "next build", + "postbuild": "next-sitemap", "start": "next start" }, "dependencies": { @@ -22,6 +23,7 @@ "@types/node": "^20.0.0", "@types/react": "^18.2.0", "autoprefixer": "^10.4.23", + "next-sitemap": "^4.2.3", "postcss": "^8.5.6", "tailwindcss": "^3.4.17", "typescript": "^5.0.0" diff --git a/public/robots.txt b/public/robots.txt new file mode 100644 index 0000000..54b479d --- /dev/null +++ b/public/robots.txt @@ -0,0 +1,9 @@ +# * +User-agent: * +Allow: / + +# Host +Host: https://docs.trustlab.dyzulk.com + +# Sitemaps +Sitemap: https://docs.trustlab.dyzulk.com/sitemap.xml diff --git a/public/sitemap.xml b/public/sitemap.xml new file mode 100644 index 0000000..71c3cb9 --- /dev/null +++ b/public/sitemap.xml @@ -0,0 +1,20 @@ + + +https://docs.trustlab.dyzulk.com2026-01-09T09:09:34.013Zdaily0.7 +https://docs.trustlab.dyzulk.com/developer2026-01-09T09:09:34.014Zdaily0.7 +https://docs.trustlab.dyzulk.com/developer/endpoints2026-01-09T09:09:34.014Zdaily0.7 +https://docs.trustlab.dyzulk.com/guide2026-01-09T09:09:34.014Zdaily0.7 +https://docs.trustlab.dyzulk.com/guide/certificates/download-install2026-01-09T09:09:34.014Zdaily0.7 +https://docs.trustlab.dyzulk.com/guide/certificates/renewal2026-01-09T09:09:34.014Zdaily0.7 +https://docs.trustlab.dyzulk.com/guide/certificates/request-new2026-01-09T09:09:34.014Zdaily0.7 +https://docs.trustlab.dyzulk.com/guide/certificates/revocation2026-01-09T09:09:34.014Zdaily0.7 +https://docs.trustlab.dyzulk.com/guide/certificates/view-details2026-01-09T09:09:34.014Zdaily0.7 +https://docs.trustlab.dyzulk.com/guide/concepts/pki-fundamentals2026-01-09T09:09:34.014Zdaily0.7 +https://docs.trustlab.dyzulk.com/guide/concepts/trust-architecture2026-01-09T09:09:34.014Zdaily0.7 +https://docs.trustlab.dyzulk.com/guide/getting-started/access-dashboard2026-01-09T09:09:34.014Zdaily0.7 +https://docs.trustlab.dyzulk.com/guide/getting-started/install-root-ca2026-01-09T09:09:34.014Zdaily0.7 +https://docs.trustlab.dyzulk.com/guide/integrations/smime2026-01-09T09:09:34.014Zdaily0.7 +https://docs.trustlab.dyzulk.com/guide/integrations/web-servers2026-01-09T09:09:34.014Zdaily0.7 +https://docs.trustlab.dyzulk.com/guide/troubleshooting/browser-errors2026-01-09T09:09:34.014Zdaily0.7 +https://docs.trustlab.dyzulk.com/guide/troubleshooting/developer-tools2026-01-09T09:09:34.014Zdaily0.7 + \ No newline at end of file