···60606161- `description.md` is used for the homepage description
6262- `about.md` is used for the about page
6363+6464+## Notes
6565+6666+Search currently only works in production mode (i.e. when running `npm run build`) not in dev mode (`npm run dev`).
6767+6868+## Credits
6969+7070+Adopted from the default astro blog template when running `npm create astro@latest`.
7171+7272+## License
7373+7474+MIT.
···11import { OGImageRoute } from "astro-og-canvas";
22-import { getCollection } from "astro:content";
32import { SITE_DESCRIPTION, SITE_TITLE } from "../../config.json";
33+import { getBlogPosts } from "src/utils";
4455-const posts = await getCollection("blog");
55+const posts = await getBlogPosts();
6677// turn posts into an object with slugs as keys, and title and description as values
88// { slug: { title, description } }
···2525 >,
2626);
27272828-console.log(pages);
2928export const { getStaticPaths, GET } = OGImageRoute({
3029 // Tell us the name of your dynamic route segment.
3130 // In this case it’s `route`, because the file is named `[...route].ts`.
-4
src/pages/pages/[...index].astro
···33 SITE_TITLE,
44 SITE_DESCRIPTION,
55 POSTS_PER_PAGE,
66- ACCENT_COLOR,
77- BASE_COLOR,
86} from "../../config.json";
97108import Header from "$components/Header.astro";
···1210import BaseLayout from "$layouts/BaseLayout.astro";
1311import BlogEntry from "$components/BlogEntry.astro";
1412import Pagination from "$components/Pagination.astro";
1515-import { colorBaseClasses, colorAccentClasses } from "src/colors";
1613import { getBlogPosts } from "src/utils";
17141818-import { Content } from "$content/info/description.md";
1915import BlogPost from "$layouts/BlogPost.astro";
20162117export async function getStaticPaths() {
+2-2
src/pages/rss.xml.js
···11import rss from "@astrojs/rss";
22-import { getCollection } from "astro:content";
32import { SITE_TITLE, SITE_DESCRIPTION } from "../config.json";
33+import { getBlogPosts } from "src/utils";
4455export async function GET(context) {
66- const posts = await getCollection("blog");
66+ const posts = await getBlogPosts();
77 return rss({
88 title: SITE_TITLE,
99 description: SITE_DESCRIPTION,
-2
src/pages/tags/[...tag]/[...index].astro
···77 BASE_COLOR,
88} from "../../../config.json";
991010-import { getCollection } from "astro:content";
1111-1210import Header from "$components/Header.astro";
1311import Footer from "$components/Footer.astro";
1412import BaseLayout from "$layouts/BaseLayout.astro";