From ef4ebe5d003a7f564ff6e143fb66072659d7524c Mon Sep 17 00:00:00 2001 From: Shinsina Date: Fri, 1 Mar 2024 16:12:29 -0600 Subject: [PATCH] Add sitemap integration --- astro.config.mjs | 3 ++- package-lock.json | 59 +++++++++++++++++++++++++++++++++++++++++++++++ package.json | 1 + public/robots.txt | 4 ++++ 4 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 public/robots.txt diff --git a/astro.config.mjs b/astro.config.mjs index 062ec95..68fc0fa 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -1,10 +1,11 @@ import { defineConfig } from 'astro/config'; import tailwind from "@astrojs/tailwind"; import prefetch from "@astrojs/prefetch"; +import sitemap from "@astrojs/sitemap"; // https://astro.build/config export default defineConfig({ site: "https://shinsina.github.io", base: "/Stat-N-Track", - integrations: [tailwind(), prefetch()] + integrations: [tailwind(), prefetch(), sitemap()] }); diff --git a/package-lock.json b/package-lock.json index c56005b..4ea26af 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "dependencies": { "@alpinejs/collapse": "^3.13.3", "@astrojs/prefetch": "^0.4.1", + "@astrojs/sitemap": "^3.1.1", "@astrojs/tailwind": "^5.1.0", "@types/alpinejs": "^3.13.5", "alpinejs": "^3.13.3", @@ -97,6 +98,15 @@ "node": ">=18.14.1" } }, + "node_modules/@astrojs/sitemap": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@astrojs/sitemap/-/sitemap-3.1.1.tgz", + "integrity": "sha512-qPgdBIcDUaea98mTtLfi5z9oXZpzSjEn/kes70/Ex8FOZZ+DIHVKRYOLOtvy8p+FTXr/9oc7BjmIbTYmYLLJVg==", + "dependencies": { + "sitemap": "^7.1.1", + "zod": "^3.22.4" + } + }, "node_modules/@astrojs/tailwind": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/@astrojs/tailwind/-/tailwind-5.1.0.tgz", @@ -1125,6 +1135,22 @@ "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, + "node_modules/@types/node": { + "version": "20.11.24", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.24.tgz", + "integrity": "sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==", + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/@types/sax": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@types/sax/-/sax-1.2.7.tgz", + "integrity": "sha512-rO73L89PJxeYM3s3pPPjiPgVVcymqU490g0YO5n5By0k2Erzj6tay/4lr1CHAAU4JyOWd1rpQ8bCf6cZfHU96A==", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/unist": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.2.tgz", @@ -5343,6 +5369,11 @@ } ] }, + "node_modules/sax": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.3.0.tgz", + "integrity": "sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA==" + }, "node_modules/section-matter": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/section-matter/-/section-matter-1.0.0.tgz", @@ -5487,6 +5518,29 @@ "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==", + "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/sitemap/node_modules/@types/node": { + "version": "17.0.45", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.45.tgz", + "integrity": "sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==" + }, "node_modules/source-map-js": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", @@ -5937,6 +5991,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + }, "node_modules/unherit": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/unherit/-/unherit-3.0.1.tgz", diff --git a/package.json b/package.json index 429db69..edd0814 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "dependencies": { "@alpinejs/collapse": "^3.13.3", "@astrojs/prefetch": "^0.4.1", + "@astrojs/sitemap": "^3.1.1", "@astrojs/tailwind": "^5.1.0", "@types/alpinejs": "^3.13.5", "alpinejs": "^3.13.3", diff --git a/public/robots.txt b/public/robots.txt new file mode 100644 index 0000000..7f6dcd9 --- /dev/null +++ b/public/robots.txt @@ -0,0 +1,4 @@ +User-agent: * +Allow: / + +Sitemap: https://shinsina.github.io/Stat-N-Track/sitemap-index.xml