feat: opengraph design

This commit is contained in:
enscribe 2024-09-12 16:34:38 -07:00
parent 0b430e5d43
commit c410c499e1
No known key found for this signature in database
GPG key ID: 9BBD5C4114E25322
38 changed files with 179 additions and 66 deletions

View file

@ -39,7 +39,7 @@ const authorPosts = allPosts
<Layout
title={`${author.data.name} - Author`}
description={author.data.bio || `Profile of ${author.data.name}`}
description={author.data.bio || `Profile of ${author.data.name}.`}
>
<Container>
<Breadcrumb className="mb-6">

View file

@ -16,7 +16,7 @@ import { HomeIcon } from 'lucide-react'
const authors = await getCollection('authors')
---
<Layout title="Authors" description="Authors">
<Layout title="Authors" description="A list of authors on this site.">
<Container>
<Breadcrumb className="mb-6">
<BreadcrumbList>

View file

@ -62,7 +62,11 @@ const { Content, headings } = await post.render()
const authors = await parseAuthors(post.data.authors ?? [])
---
<Layout title={post.data.title} description={post.data.description}>
<Layout
title={post.data.title}
description={post.data.description}
image={post.data.image ?? '/static/1200x630.png'}
>
<Container>
<Breadcrumb className="mb-6">
<BreadcrumbList>
@ -89,7 +93,7 @@ const authors = await parseAuthors(post.data.authors ?? [])
alt={post.data.title}
width={1200}
height={630}
class="mb-8 rounded-xl object-cover shadow-lg"
class="mb-8 rounded-xl object-cover"
/>
)
}
@ -162,7 +166,7 @@ const authors = await parseAuthors(post.data.authors ?? [])
{headings.length > 0 && <TableOfContents headings={headings} />}
<article class="prose prose-neutral max-w-none dark:prose-invert">
<article class="prose prose-stone max-w-none dark:prose-invert">
<Content />
</article>
@ -170,7 +174,7 @@ const authors = await parseAuthors(post.data.authors ?? [])
</Container>
<Button
variant="secondary"
variant="outline"
size="icon"
className="group fixed bottom-8 right-8 z-50 hidden"
id="scroll-to-top"

View file

@ -20,7 +20,7 @@ const blog = (await getCollection('blog'))
.slice(0, SITE.NUM_POSTS_ON_HOMEPAGE)
---
<Layout title="Home" description="Home">
<Layout title={SITE.TITLE} description={SITE.DESCRIPTION}>
<Container class="flex flex-col gap-y-6">
<section>
<Card>