Add Sitemaps, Robots

This commit is contained in:
Ben C 2023-07-03 02:56:30 -04:00
parent 21863c687c
commit 278f775a38
No known key found for this signature in database
GPG Key ID: 556064B755159BBC
4 changed files with 67 additions and 3 deletions

View File

@ -1,17 +1,25 @@
import { defineConfig } from "astro/config"; import { defineConfig } from "astro/config";
import preact from "@astrojs/preact"; import preact from "@astrojs/preact";
import react from "@astrojs/react"; import react from "@astrojs/react";
import mdx from "@astrojs/mdx"; import mdx from "@astrojs/mdx";
import sitemap from "@astrojs/sitemap";
const site = `https://nh.outerwildsmods.com`;
// https://astro.build/config // https://astro.build/config
export default defineConfig({ export default defineConfig({
compressHTML: true,
integrations: [ integrations: [
// Enable Preact to support Preact JSX components. // Enable Preact to support Preact JSX components.
preact(), preact(),
// Enable React for the Algolia search component. // Enable React for the Algolia search component.
react(), react(),
mdx() mdx(),
sitemap({
filter: (page) =>
page !== `${site}/404.html` && page !== `${site}/reference/audio-enum/`
})
], ],
site: `https://nh.outerwildsmods.com` site
}); });

View File

@ -16,6 +16,7 @@
"@astrojs/mdx": "^0.19.7", "@astrojs/mdx": "^0.19.7",
"@astrojs/preact": "^2.2.1", "@astrojs/preact": "^2.2.1",
"@astrojs/react": "^2.2.1", "@astrojs/react": "^2.2.1",
"@astrojs/sitemap": "^1.3.3",
"@docsearch/css": "^3.3.4", "@docsearch/css": "^3.3.4",
"@docsearch/react": "^3.3.4", "@docsearch/react": "^3.3.4",
"@types/node": "^18.16.3", "@types/node": "^18.16.3",

50
docs/pnpm-lock.yaml generated
View File

@ -20,6 +20,9 @@ dependencies:
"@astrojs/react": "@astrojs/react":
specifier: ^2.2.1 specifier: ^2.2.1
version: 2.2.1(@types/react-dom@18.2.3)(@types/react@18.2.5)(react-dom@18.2.0)(react@18.2.0) version: 2.2.1(@types/react-dom@18.2.3)(@types/react@18.2.5)(react-dom@18.2.0)(react@18.2.0)
"@astrojs/sitemap":
specifier: ^1.3.3
version: 1.3.3
"@docsearch/css": "@docsearch/css":
specifier: ^3.3.4 specifier: ^3.3.4
version: 3.3.4 version: 3.3.4
@ -448,6 +451,16 @@ packages:
- supports-color - supports-color
dev: false dev: false
/@astrojs/sitemap@1.3.3:
resolution:
{
integrity: sha512-TPyyb/hKxc+bHPpSoNPhsuI0QOTVzq2tueg2r0CTH1HqigYIAA2LQkCBlQzz85R+LrOZpv4kXYmhxdDcSkJCmA==
}
dependencies:
sitemap: 7.1.1
zod: 3.21.4
dev: false
/@astrojs/telemetry@2.1.1: /@astrojs/telemetry@2.1.1:
resolution: resolution:
{ {
@ -1476,6 +1489,13 @@ packages:
"@types/unist": 2.0.6 "@types/unist": 2.0.6
dev: false dev: false
/@types/node@17.0.45:
resolution:
{
integrity: sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==
}
dev: false
/@types/node@18.16.3: /@types/node@18.16.3:
resolution: resolution:
{ {
@ -1524,6 +1544,15 @@ packages:
} }
dev: false dev: false
/@types/sax@1.2.4:
resolution:
{
integrity: sha512-pSAff4IAxJjfAXUG6tFkO7dsSbTmf8CtUpfhhZ5VhkRpC4628tJhh3+V6H1E+/Gs9piSzYKT5yzHO5M4GG9jkw==
}
dependencies:
"@types/node": 18.16.3
dev: false
/@types/scheduler@0.16.3: /@types/scheduler@0.16.3:
resolution: resolution:
{ {
@ -1819,6 +1848,13 @@ packages:
picomatch: 2.3.1 picomatch: 2.3.1
dev: false dev: false
/arg@5.0.2:
resolution:
{
integrity: sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==
}
dev: false
/argparse@1.0.10: /argparse@1.0.10:
resolution: resolution:
{ {
@ -5557,6 +5593,20 @@ packages:
} }
dev: false dev: false
/sitemap@7.1.1:
resolution:
{
integrity: sha512-mK3aFtjz4VdJN0igpIJrinf3EO8U8mxOPsTBzSsy06UtjZQJ3YY3o3Xa7zSc5nMqcMrRwlChHZ18Kxg0caiPBg==
}
engines: { node: ">=12.0.0", npm: ">=5.6.0" }
hasBin: true
dependencies:
"@types/node": 17.0.45
"@types/sax": 1.2.4
arg: 5.0.2
sax: 1.2.4
dev: false
/slash@3.0.0: /slash@3.0.0:
resolution: resolution:
{ {

5
docs/public/robots.txt Normal file
View File

@ -0,0 +1,5 @@
User-agent: *
Disallow: /audio-enum/
Disallow: /404.html
Sitemap: https://nh.outerwildsmods.com/sitemap-index.xml