diff --git a/astro.config.mjs b/astro.config.mjs index 882e651..f5a8ffe 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -1,4 +1,8 @@ import { defineConfig } from 'astro/config'; +import sitemap from '@astrojs/sitemap'; // https://astro.build/config -export default defineConfig({}); +export default defineConfig({ + site: 'https://dashersupply.com', + integrations: [sitemap()], +}); diff --git a/package-lock.json b/package-lock.json index 84976e7..155dfb1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "version": "0.0.1", "dependencies": { "@astrojs/check": "^0.8.1", + "@astrojs/sitemap": "^3.1.6", "astro": "^4.11.5", "bootstrap": "^5.3.3", "cheerio": "*", @@ -216,6 +217,17 @@ "node": "^18.17.1 || ^20.3.0 || >=21.0.0" } }, + "node_modules/@astrojs/sitemap": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/@astrojs/sitemap/-/sitemap-3.1.6.tgz", + "integrity": "sha512-1Qp2NvAzVImqA6y+LubKi1DVhve/hXXgFvB0szxiipzh7BvtuKe4oJJ9dXSqaubaTkt4nMa6dv6RCCAYeB6xaQ==", + "license": "MIT", + "dependencies": { + "sitemap": "^7.1.2", + "stream-replace-string": "^2.0.0", + "zod": "^3.23.8" + } + }, "node_modules/@astrojs/telemetry": { "version": "3.1.0", "license": "MIT", @@ -1990,6 +2002,12 @@ "node": ">= 8" } }, + "node_modules/arg": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", + "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", + "license": "MIT" + }, "node_modules/argparse": { "version": "2.0.1", "license": "Python-2.0" @@ -7051,6 +7069,31 @@ "version": "1.0.5", "license": "MIT" }, + "node_modules/sitemap": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/sitemap/-/sitemap-7.1.2.tgz", + "integrity": "sha512-ARCqzHJ0p4gWt+j7NlU5eDlIO9+Rkr/JhPFZKKQ1l5GCus7rJH4UdrlVAh0xC/gDS/Qir2UMxqYNHtsKr2rpCw==", + "license": "MIT", + "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==", + "license": "MIT" + }, "node_modules/smart-buffer": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", @@ -7156,6 +7199,12 @@ "stream-chain": "^2.2.5" } }, + "node_modules/stream-replace-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/stream-replace-string/-/stream-replace-string-2.0.0.tgz", + "integrity": "sha512-TlnjJ1C0QrmxRNrON00JvaFFlNh5TTG00APw23j74ET7gkQpTASi6/L2fuiav8pzK715HXtUeClpBTw2NPSn6w==", + "license": "MIT" + }, "node_modules/string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", diff --git a/package.json b/package.json index 70761a4..d6e8f0d 100644 --- a/package.json +++ b/package.json @@ -11,19 +11,20 @@ }, "dependencies": { "@astrojs/check": "^0.8.1", + "@astrojs/sitemap": "^3.1.6", "astro": "^4.11.5", "bootstrap": "^5.3.3", "cheerio": "*", "crawlee": "^3.0.0", - "playwright": "*", "markdown-it": "^14.0.0", - "markdown-it-attrs": "^4.1.6" - }, + "markdown-it-attrs": "^4.1.6", + "playwright": "*" + }, "devDependencies": { "@apify/tsconfig": "^0.1.0", - "@types/node": "^20.0.0", "@types/markdown-it": "^14.1.1", "@types/markdown-it-attrs": "^4.1.3", + "@types/node": "^20.0.0", "tsx": "^4.4.0", "typescript": "^5.5.2" } diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index a397c2e..534a0b5 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -24,6 +24,7 @@ const { title } = Astro.props; + diff --git a/src/pages/about.astro b/src/pages/about.astro index 4b765b7..e17ce01 100644 --- a/src/pages/about.astro +++ b/src/pages/about.astro @@ -35,6 +35,9 @@ import { ALL_CATEGORIES } from '../data/categories';

As an Amazon Associate I earn from qualifying purchases.

+

+ As an DoorDash Dasher I earn by completing deliveries. +

Cookies?

We probably use them. I'm using Google Analytics and Cloudflare Analytics. I'm interested in knowing what everyone else likes. diff --git a/src/pages/robots.txt.ts b/src/pages/robots.txt.ts new file mode 100644 index 0000000..9649a44 --- /dev/null +++ b/src/pages/robots.txt.ts @@ -0,0 +1,16 @@ +import type { APIRoute } from 'astro'; + +const robotsTxt = ` +User-agent: * +Allow: / + +Sitemap: ${new URL('sitemap-index.xml', import.meta.env.SITE).href} +`.trim(); + +export const GET: APIRoute = () => { + return new Response(robotsTxt, { + headers: { + 'Content-Type': 'text/plain; charset=utf-8', + }, + }); +}; \ No newline at end of file