Skip to content

Dynamic OG Adjustments #163

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 16 additions & 9 deletions app/api/og/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ import {NextRequest} from 'next/server';
export const runtime = 'edge'; // Required for @vercel/og

const muotoBold = new URL('../../fonts/muoto-bold.woff', import.meta.url);
const zeroLogo = new URL(
'../../../public/images/zero-logo.svg',
const muotoReg = new URL('../../fonts/muoto-regular.woff', import.meta.url);
const zeroDocsLogo = new URL(
'../../../public/images/zero-docs-logo.svg',
import.meta.url,
);

Expand All @@ -27,7 +28,6 @@ export async function GET(req: NextRequest) {
backgroundColor: 'black',
justifyContent: 'center',
color: 'white',
fontFamily: 'muoto-bold',
padding: '0 200px',
textAlign: 'center',
}}
Expand All @@ -36,27 +36,30 @@ export async function GET(req: NextRequest) {
style={{
fontSize: 86,
letterSpacing: '-2.58px' /* 86 * -3% */,
fontFamily: 'muoto-bold',
}}
>
{title}
</div>
{subtitle && (
<div
style={{
fontSize: 30,
marginTop: 15,
fontSize: 48,
marginTop: 36,
lineHeight: 1.4,
padding: '0 80px',
color: 'white',
fontFamily: 'muoto-bold',
letterSpacing: '-.09px' /* 48 * -3% */,
fontWeight: 400,
fontFamily: 'muoto-reg',
}}
>
{subtitle}
</div>
)}
<img
src={await loadFileAsBase64URL(zeroLogo, 'image/svg+xml')}
src={await loadFileAsBase64URL(zeroDocsLogo, 'image/svg+xml')}
alt="Zero"
style={{width: 266, height: 72.88, marginTop: 75}}
style={{width: 424, height: 80, marginTop: 75}}
/>
</div>
),
Expand All @@ -68,6 +71,10 @@ export async function GET(req: NextRequest) {
name: 'muoto-bold',
data: await loadFile(muotoBold),
},
{
name: 'muoto-reg',
data: await loadFile(muotoReg),
},
],
},
);
Expand Down
10 changes: 6 additions & 4 deletions app/docs/[[...slug]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@ export default async function DocsPage({params: {slug = []}}: PageProps) {
<div className="flex flex-[4] min-w-0 items-start gap-14">
<div className="flex-[3] min-w-0 py-10">
<Typography>
<h1 className="text-3xl -mt-2">{res.frontmatter.title}</h1>
<p className="-mt-4 text-muted-foreground text-[16.5px]">
{res.frontmatter.description}
</p>
<h1 className="text-3xl -mt-2 mb-12">{res.frontmatter.title}</h1>
{res.frontmatter.description && (
<p className="-mt-10 text-muted-foreground text-[16.5px]">
{res.frontmatter.description}
</p>
)}
{/* Wrap content with CopyableContent */}
<CopyContent content={res.content} />
<Pagination previousNext={previousNext} />
Expand Down
Binary file added app/fonts/muoto-regular.woff
Binary file not shown.
3 changes: 3 additions & 0 deletions contents/docs/status.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
title: Project Status
---

<Note type="warning" emoji="🚧" heading="Zero is in Alpha">
Zero is a new sync engine based on a novel streaming query engine. This is an ambitious project at an early stage.
Expand Down
12 changes: 12 additions & 0 deletions public/images/zero-docs-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.