refactor: update site metadata structure
This commit is contained in:
parent
71d1df3bd7
commit
931bf7277c
15 changed files with 123 additions and 114 deletions
|
@ -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' }]} />
|
||||
|
||||
|
|
|
@ -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' }]} />
|
||||
|
||||
|
|
|
@ -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 },
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue