From d48a0d12e18af7fd7b56e71002ae84f8816e35ed Mon Sep 17 00:00:00 2001 From: Sat Naing Date: Thu, 22 Sep 2022 22:47:30 +0630 Subject: [PATCH] Add sitemap integration --- astro.config.mjs | 12 +++++- package-lock.json | 94 +++++++++++++++++++++++++++++++++++++++++++++++ package.json | 1 + 3 files changed, 106 insertions(+), 1 deletion(-) diff --git a/astro.config.mjs b/astro.config.mjs index 6096c99..2ced6a9 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -3,6 +3,7 @@ import tailwind from "@astrojs/tailwind"; import react from "@astrojs/react"; import remarkToc from "remark-toc"; import remarkCollapse from "remark-collapse"; +import sitemap from "@astrojs/sitemap"; // https://astro.build/config export default defineConfig({ @@ -14,9 +15,18 @@ export default defineConfig({ }, }), react(), + sitemap(), ], markdown: { - remarkPlugins: [remarkToc, [remarkCollapse, { test: "Table of contents" }]], + remarkPlugins: [ + remarkToc, + [ + remarkCollapse, + { + test: "Table of contents", + }, + ], + ], extendDefaultPlugins: true, }, }); diff --git a/package-lock.json b/package-lock.json index 9380e1e..e891e21 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,6 +17,7 @@ }, "devDependencies": { "@astrojs/react": "^1.1.3", + "@astrojs/sitemap": "^1.0.0", "@astrojs/tailwind": "^1.0.0", "@tailwindcss/typography": "^0.5.7", "react": "^18.2.0", @@ -142,6 +143,16 @@ "fast-xml-parser": "^4.0.8" } }, + "node_modules/@astrojs/sitemap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@astrojs/sitemap/-/sitemap-1.0.0.tgz", + "integrity": "sha512-42GxuF5FP7RaKXZrwGLBLOX3hPv+Wl7ExJC43O0J5e34ojJkLeKf7QfwN1UwrJlqH0Ywi0Fm4/xGe482G09+wg==", + "dev": true, + "dependencies": { + "sitemap": "^7.1.1", + "zod": "^3.17.3" + } + }, "node_modules/@astrojs/tailwind": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@astrojs/tailwind/-/tailwind-1.0.0.tgz", @@ -779,6 +790,12 @@ "@types/unist": "*" } }, + "node_modules/@types/node": { + "version": "17.0.45", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.45.tgz", + "integrity": "sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==", + "dev": true + }, "node_modules/@types/parse5": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/@types/parse5/-/parse5-6.0.3.tgz", @@ -804,6 +821,15 @@ "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz", "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==" }, + "node_modules/@types/sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@types/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-pSAff4IAxJjfAXUG6tFkO7dsSbTmf8CtUpfhhZ5VhkRpC4628tJhh3+V6H1E+/Gs9piSzYKT5yzHO5M4GG9jkw==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/scheduler": { "version": "0.16.2", "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", @@ -5032,6 +5058,12 @@ "suf-log": "^2.5.3" } }, + "node_modules/sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "dev": true + }, "node_modules/scheduler": { "version": "0.23.0", "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", @@ -5124,6 +5156,25 @@ "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==" }, + "node_modules/sitemap": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/sitemap/-/sitemap-7.1.1.tgz", + "integrity": "sha512-mK3aFtjz4VdJN0igpIJrinf3EO8U8mxOPsTBzSsy06UtjZQJ3YY3o3Xa7zSc5nMqcMrRwlChHZ18Kxg0caiPBg==", + "dev": true, + "dependencies": { + "@types/node": "^17.0.5", + "@types/sax": "^1.2.1", + "arg": "^5.0.0", + "sax": "^1.2.4" + }, + "bin": { + "sitemap": "dist/cli.js" + }, + "engines": { + "node": ">=12.0.0", + "npm": ">=5.6.0" + } + }, "node_modules/slash": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", @@ -6151,6 +6202,16 @@ "fast-xml-parser": "^4.0.8" } }, + "@astrojs/sitemap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@astrojs/sitemap/-/sitemap-1.0.0.tgz", + "integrity": "sha512-42GxuF5FP7RaKXZrwGLBLOX3hPv+Wl7ExJC43O0J5e34ojJkLeKf7QfwN1UwrJlqH0Ywi0Fm4/xGe482G09+wg==", + "dev": true, + "requires": { + "sitemap": "^7.1.1", + "zod": "^3.17.3" + } + }, "@astrojs/tailwind": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@astrojs/tailwind/-/tailwind-1.0.0.tgz", @@ -6652,6 +6713,12 @@ "@types/unist": "*" } }, + "@types/node": { + "version": "17.0.45", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.45.tgz", + "integrity": "sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==", + "dev": true + }, "@types/parse5": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/@types/parse5/-/parse5-6.0.3.tgz", @@ -6677,6 +6744,15 @@ "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz", "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==" }, + "@types/sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@types/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-pSAff4IAxJjfAXUG6tFkO7dsSbTmf8CtUpfhhZ5VhkRpC4628tJhh3+V6H1E+/Gs9piSzYKT5yzHO5M4GG9jkw==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, "@types/scheduler": { "version": "0.16.2", "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", @@ -9400,6 +9476,12 @@ "suf-log": "^2.5.3" } }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "dev": true + }, "scheduler": { "version": "0.23.0", "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", @@ -9476,6 +9558,18 @@ "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==" }, + "sitemap": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/sitemap/-/sitemap-7.1.1.tgz", + "integrity": "sha512-mK3aFtjz4VdJN0igpIJrinf3EO8U8mxOPsTBzSsy06UtjZQJ3YY3o3Xa7zSc5nMqcMrRwlChHZ18Kxg0caiPBg==", + "dev": true, + "requires": { + "@types/node": "^17.0.5", + "@types/sax": "^1.2.1", + "arg": "^5.0.0", + "sax": "^1.2.4" + } + }, "slash": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", diff --git a/package.json b/package.json index cf2a67d..e51b235 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ }, "devDependencies": { "@astrojs/react": "^1.1.3", + "@astrojs/sitemap": "^1.0.0", "@astrojs/tailwind": "^1.0.0", "@tailwindcss/typography": "^0.5.7", "react": "^18.2.0",