From c8cd2ec70e53e36a88989f0f848191615b81ae14 Mon Sep 17 00:00:00 2001 From: Xanazf Date: Fri, 25 Oct 2024 04:47:13 +0300 Subject: [PATCH] sitemap and robots.txt added --- astro.config.mjs | 3 +++ package.json | 1 + public/robots.txt | 4 +++ src/config/Head.astro | 1 + yarn.lock | 63 +++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 72 insertions(+) create mode 100644 public/robots.txt diff --git a/astro.config.mjs b/astro.config.mjs index 6cd6ec6..c674b1e 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -2,6 +2,7 @@ import { defineConfig } from "astro/config"; import solidJs from "@astrojs/solid-js"; import mdx from "@astrojs/mdx"; import icon from "astro-icon"; +import sitemap from "@astrojs/sitemap"; import pagefind from "./pagefind"; import { markdownConfig } from "./src/config/io/markdown.ts"; @@ -9,6 +10,7 @@ import { markdownConfig } from "./src/config/io/markdown.ts"; // https://astro.build/config export default defineConfig({ markdown: markdownConfig, + site: "https://quickshell.outfoxxed.me", integrations: [ solidJs({ devtools: true, @@ -16,5 +18,6 @@ export default defineConfig({ mdx(), pagefind(), icon(), + sitemap(), ], }); diff --git a/package.json b/package.json index 3bfa99e..a9fcd68 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "@astrojs/check": "^0.9.4", "@astrojs/markdown-remark": "^5.3.0", "@astrojs/mdx": "^3.1.8", + "@astrojs/sitemap": "^3.2.1", "@astrojs/solid-js": "^4.4.2", "@fontsource-variable/rubik": "^5.1.0", "@hbsnow/rehype-sectionize": "^1.0.7", diff --git a/public/robots.txt b/public/robots.txt new file mode 100644 index 0000000..52e315c --- /dev/null +++ b/public/robots.txt @@ -0,0 +1,4 @@ +User-agent: * +Allow: / + +Sitemap: https://quickshell.outfoxxed.me/sitemap-index.xml diff --git a/src/config/Head.astro b/src/config/Head.astro index 0117f8a..17b3e51 100644 --- a/src/config/Head.astro +++ b/src/config/Head.astro @@ -14,6 +14,7 @@ const { title, description } = Astro.props; + {title} diff --git a/yarn.lock b/yarn.lock index bb6bfe6..cec09d6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -212,6 +212,17 @@ __metadata: languageName: node linkType: hard +"@astrojs/sitemap@npm:^3.2.1": + version: 3.2.1 + resolution: "@astrojs/sitemap@npm:3.2.1" + dependencies: + sitemap: "npm:^8.0.0" + stream-replace-string: "npm:^2.0.0" + zod: "npm:^3.23.8" + checksum: 10c0/03a883dcf5ea18963e2b9031c07ea131d8c79efbc76abb42a06e71db1ad252696846c187187f2804b16d1d51b740419433a1eacb4abe0e93d74056320aee12ae + languageName: node + linkType: hard + "@astrojs/solid-js@npm:^4.4.2": version: 4.4.2 resolution: "@astrojs/solid-js@npm:4.4.2" @@ -1900,6 +1911,13 @@ __metadata: languageName: node linkType: hard +"@types/node@npm:^17.0.5": + version: 17.0.45 + resolution: "@types/node@npm:17.0.45" + checksum: 10c0/0db377133d709b33a47892581a21a41cd7958f22723a3cc6c71d55ac018121382de42fbfc7970d5ae3e7819dbe5f40e1c6a5174aedf7e7964e9cb8fa72b580b0 + languageName: node + linkType: hard + "@types/node@npm:^20.14.11": version: 20.16.12 resolution: "@types/node@npm:20.16.12" @@ -1916,6 +1934,15 @@ __metadata: languageName: node linkType: hard +"@types/sax@npm:^1.2.1": + version: 1.2.7 + resolution: "@types/sax@npm:1.2.7" + dependencies: + "@types/node": "npm:*" + checksum: 10c0/d077a761a0753b079bf8279b3993948030ca86ed9125437b9b29c1de40db9b2deb7fddc369f014b58861d450e8b8cc75f163aa29dc8cea81952efbfd859168cf + languageName: node + linkType: hard + "@types/tar@npm:^6.1.13": version: 6.1.13 resolution: "@types/tar@npm:6.1.13" @@ -2980,6 +3007,13 @@ __metadata: languageName: node linkType: hard +"arg@npm:^5.0.0": + version: 5.0.2 + resolution: "arg@npm:5.0.2" + checksum: 10c0/ccaf86f4e05d342af6666c569f844bec426595c567d32a8289715087825c2ca7edd8a3d204e4d2fb2aa4602e09a57d0c13ea8c9eea75aac3dbb4af5514e6800e + languageName: node + linkType: hard + "argparse@npm:^1.0.7": version: 1.0.10 resolution: "argparse@npm:1.0.10" @@ -6678,6 +6712,7 @@ __metadata: "@astrojs/check": "npm:^0.9.4" "@astrojs/markdown-remark": "npm:^5.3.0" "@astrojs/mdx": "npm:^3.1.8" + "@astrojs/sitemap": "npm:^3.2.1" "@astrojs/solid-js": "npm:^4.4.2" "@astrojs/ts-plugin": "npm:^1.10.3" "@biomejs/biome": "npm:^1.8.3" @@ -7060,6 +7095,13 @@ __metadata: languageName: node linkType: hard +"sax@npm:^1.2.4": + version: 1.4.1 + resolution: "sax@npm:1.4.1" + checksum: 10c0/6bf86318a254c5d898ede6bd3ded15daf68ae08a5495a2739564eb265cd13bcc64a07ab466fb204f67ce472bb534eb8612dac587435515169593f4fffa11de7c + languageName: node + linkType: hard + "section-matter@npm:^1.0.0": version: 1.0.0 resolution: "section-matter@npm:1.0.0" @@ -7226,6 +7268,20 @@ __metadata: languageName: node linkType: hard +"sitemap@npm:^8.0.0": + version: 8.0.0 + resolution: "sitemap@npm:8.0.0" + dependencies: + "@types/node": "npm:^17.0.5" + "@types/sax": "npm:^1.2.1" + arg: "npm:^5.0.0" + sax: "npm:^1.2.4" + bin: + sitemap: dist/cli.js + checksum: 10c0/adaabfb1f27e3c76ba25f9a16dcb02ff17dd2ecbd1b2dbe2608a6770eff37bd71f7d21c10df6824917453bc4da2c2790fd85ee6424d75699bd053e3422d2ef5c + languageName: node + linkType: hard + "smart-buffer@npm:^4.2.0": version: 4.2.0 resolution: "smart-buffer@npm:4.2.0" @@ -7351,6 +7407,13 @@ __metadata: languageName: node linkType: hard +"stream-replace-string@npm:^2.0.0": + version: 2.0.0 + resolution: "stream-replace-string@npm:2.0.0" + checksum: 10c0/6cdf6108c57a869c1282dece0728bd7a8e314855bee71992436460192cdf46b3c976451e1e114716af209b2bfefa0e7e4581ca0eebc330d9dfcde341a72d50af + languageName: node + linkType: hard + "string-width-cjs@npm:string-width@^4.2.0, string-width@npm:^4.1.0, string-width@npm:^4.2.0, string-width@npm:^4.2.3": version: 4.2.3 resolution: "string-width@npm:4.2.3"