From fd8ed38572ddd2589f156733fa468eb5aa7020ad Mon Sep 17 00:00:00 2001 From: Joseph Montanaro Date: Mon, 30 Mar 2026 05:27:41 -0400 Subject: [PATCH] all-posts page, page titles, index page --- src/components/Post.astro | 4 +-- src/layouts/BaseLayout.astro | 8 +++++ src/pages/[slug].astro | 8 +++-- src/pages/index.astro | 12 +++++-- src/pages/posts.astro | 63 ++++++++++++++++++++++++++++++++++++ src/plugins.ts | 38 ++++++++++++++++++++++ 6 files changed, 126 insertions(+), 7 deletions(-) create mode 100644 src/pages/posts.astro create mode 100644 src/plugins.ts diff --git a/src/components/Post.astro b/src/components/Post.astro index 38b662a..58692f7 100644 --- a/src/components/Post.astro +++ b/src/components/Post.astro @@ -10,8 +10,8 @@ import { formatDate } from '@lib/datefmt'; export interface Props { entry: CollectionEntry<'posts'>, - prevSlug: string | null, - nextSlug: string | null, + prevSlug?: string | null, + nextSlug?: string | null, }; const { entry, prevSlug, nextSlug } = Astro.props; diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro index 0989573..a4705fd 100644 --- a/src/layouts/BaseLayout.astro +++ b/src/layouts/BaseLayout.astro @@ -2,6 +2,12 @@ import '@styles/main.css'; import '@fontsource-variable/baskervville-sc'; import ThemeSwitcher from '@components/ThemeSwitcher.astro'; + +export interface Props { + pageTitle: string, +} + +const { pageTitle } = Astro.props; --- @@ -9,6 +15,8 @@ import ThemeSwitcher from '@components/ThemeSwitcher.astro'; + {pageTitle} +