diff --git a/apps/site/astro.config.mjs b/apps/site/astro.config.mjs index 17f6a62..ec54e64 100644 --- a/apps/site/astro.config.mjs +++ b/apps/site/astro.config.mjs @@ -1,5 +1,10 @@ // @ts-check +import sitemap from "@astrojs/sitemap"; import { defineConfig } from "astro/config"; +import { siteConfig } from "./src/site.config.ts"; // https://astro.build/config -export default defineConfig({}); +export default defineConfig({ + site: siteConfig.baseUrl, + integrations: [sitemap()], +}); diff --git a/apps/site/package.json b/apps/site/package.json index 7b768d8..52cc096 100644 --- a/apps/site/package.json +++ b/apps/site/package.json @@ -7,16 +7,24 @@ }, "scripts": { "dev": "astro dev", - "build": "astro build", + "build": "astro build && pagefind --site dist", "preview": "astro preview", + "check": "astro check", "astro": "astro" }, "dependencies": { + "@astrojs/rss": "^4.0.19", + "@astrojs/sitemap": "^3.7.3", "astro": "^7.2.9", "marked": "^18.0.11", + "pagefind": "^1.5.2", "smol-toml": "^1.8.0" }, "allowScripts": { "esbuild": true + }, + "devDependencies": { + "@astrojs/check": "^0.9.10", + "typescript": "^5.9.3" } } diff --git a/apps/site/src/layouts/Base.astro b/apps/site/src/layouts/Base.astro index 43883d5..86fba5e 100644 --- a/apps/site/src/layouts/Base.astro +++ b/apps/site/src/layouts/Base.astro @@ -1,8 +1,12 @@ --- +import { siteConfig } from "../site.config"; + interface Props { title: string; + description?: string; } -const { title } = Astro.props; +const { title, description } = Astro.props; +const metaDescription = description ?? siteConfig.description; --- @@ -10,6 +14,10 @@ const { title } = Astro.props; {title} — andwati.com + + + +