diff --git a/astro.config.mjs b/astro.config.mjs index 93a9357..c4c4999 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -7,14 +7,15 @@ import rehypeAutolinkHeadings from 'rehype-autolink-headings'; import rehypeSlug from 'rehype-slug'; import { visit } from 'unist-util-visit'; -// Build a lookup of post slugs to their last modification dates so the sitemap -// can advertise accurate values to crawlers. astro:content isn't -// available inside the config, so we read post frontmatter directly. Our posts -// always use single-line scalar `date:` / `updated:` keys, so a small regex -// extraction is sufficient and intentional. +// Build a lookup of article slugs to their last modification dates so the +// sitemap can advertise accurate values to crawlers. astro:content +// isn't available inside the config, so we read entry frontmatter directly. +// Each entry uses a single-line top-level scalar `date:` key, so a small regex +// extraction is sufficient and intentional. (`updated:` now lives nested under +// `article:`; no entry sets it, so falling back to `date` is correct.) const postsDir = path.resolve( path.dirname(fileURLToPath(import.meta.url)), - 'src/content/posts' + 'src/content/work' ); function extractScalar(frontmatter, key) { diff --git a/src/components/ArticleList.astro b/src/components/ArticleList.astro index d2d3f9e..309ccb0 100644 --- a/src/components/ArticleList.astro +++ b/src/components/ArticleList.astro @@ -5,7 +5,7 @@ import TagList from './TagList.astro'; import { ARTICLE_THUMBNAIL, articlePath, formatDate, formatDateShort } from '../lib/site'; interface Props { - posts: CollectionEntry<'posts'>[]; + posts: CollectionEntry<'work'>[]; showYear?: boolean; tagLimit?: number; timeline?: boolean; @@ -39,7 +39,7 @@ const {

{post.data.description}

- +