refactor: update site metadata structure

This commit is contained in:
enscribe 2025-03-22 17:21:30 -07:00
parent 71d1df3bd7
commit 931bf7277c
No known key found for this signature in database
GPG key ID: 9BBD5C4114E25322
15 changed files with 123 additions and 114 deletions

View file

@ -8,7 +8,7 @@ import Layout from '@/layouts/Layout.astro'
import { cn } from '@/lib/utils'
---
<Layout title="404" description={SITE.DESCRIPTION}>
<Layout title="404" description={SITE.description}>
<Container class="flex grow flex-col gap-y-6">
<Breadcrumbs items={[{ label: '???', icon: 'lucide:circle-help' }]} />

View file

@ -10,7 +10,7 @@ import { getCollection } from 'astro:content'
const projects = await getCollection('projects')
---
<Layout title="About" description={SITE.DESCRIPTION}>
<Layout title="About" description={SITE.description}>
<Container class="flex flex-col gap-y-6">
<Breadcrumbs items={[{ label: 'About', icon: 'lucide:info' }]} />

View file

@ -16,7 +16,7 @@ export async function getStaticPaths({
const allPosts = await getCollection('blog', ({ data }) => !data.draft)
return paginate(
allPosts.sort((a, b) => b.data.date.valueOf() - a.data.date.valueOf()),
{ pageSize: SITE.POSTS_PER_PAGE },
{ pageSize: SITE.postsPerPage },
)
}

View file

@ -10,10 +10,10 @@ import { getCollection } from 'astro:content'
const blog = (await getCollection('blog'))
.filter((post) => !post.data.draft)
.sort((a, b) => b.data.date.valueOf() - a.data.date.valueOf())
.slice(0, SITE.NUM_POSTS_ON_HOMEPAGE)
.slice(0, SITE.featuredPostCount)
---
<Layout title="Home" description={SITE.DESCRIPTION}>
<Layout title="Home" description={SITE.description}>
<Container class="flex flex-col gap-y-6">
<section>
<div class="rounded-lg border">

View file

@ -9,9 +9,9 @@ export async function GET(context: APIContext) {
posts.sort((a, b) => b.data.date.valueOf() - a.data.date.valueOf())
return rss({
title: SITE.TITLE,
description: SITE.DESCRIPTION,
site: context.site ?? SITE.SITEURL,
title: SITE.title,
description: SITE.description,
site: context.site ?? SITE.href,
items: posts.map((post) => ({
title: post.data.title,
description: post.data.description,