Skip to content

Commit b14eccb

Browse files
chore: review fixes
1 parent 101a955 commit b14eccb

File tree

5 files changed

+9
-3
lines changed

5 files changed

+9
-3
lines changed

apps/sim/app/(landing)/blog/[slug]/article-sidebar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export function ArticleSidebar({ headings }: ArticleSidebarProps) {
88
if (headings.length === 0) return null
99

1010
return (
11-
<aside className='mr-2 hidden w-full shrink-0 xl:sticky xl:top-[76px] xl:block xl:w-72 xl:pt-16'>
11+
<aside className='mr-2 hidden w-full shrink-0 self-start xl:sticky xl:top-[76px] xl:block xl:w-72 xl:pt-16'>
1212
<TableOfContents headings={headings} />
1313
</aside>
1414
)

apps/sim/app/(landing)/blog/[slug]/page.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ export async function generateMetadata({
2929
return buildPostMetadata(post)
3030
}
3131

32+
export const revalidate = 86400
33+
3234
export default async function Page({ params }: { params: Promise<{ slug: string }> }) {
3335
const { slug } = await params
3436
const [post, related] = await Promise.all([getPostBySlug(slug), getRelatedPosts(slug, 3)])
@@ -53,7 +55,7 @@ export default async function Page({ params }: { params: Promise<{ slug: string
5355
/>
5456

5557
<div className='mx-auto flex w-full max-w-[1500px] flex-col items-start gap-8 px-4 pt-10 pb-24 sm:px-6 sm:pt-12 lg:px-8 lg:pt-16 xl:flex-row xl:gap-12'>
56-
<div data-blog-main-content className='mx-auto w-full min-w-0 max-w-5xl flex-grow lg:px-4'>
58+
<div data-blog-main-content className='w-full min-w-0 max-w-5xl flex-1 lg:px-4'>
5759
<Link
5860
href='/blog'
5961
className='group mb-8 inline-flex items-center gap-2 border border-[#2A2A2A] bg-[#232323] px-4 py-2 font-season text-[#999] text-[11px] uppercase tracking-widest transition-colors hover:text-[#ECECEC]'

apps/sim/app/(landing)/blog/authors/[id]/page.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import Link from 'next/link'
44
import { getAllPostMeta } from '@/lib/blog/registry'
55
import { AuthorWithSidebar } from '@/app/(landing)/blog/authors/[id]/author-with-sidebar'
66

7+
export const revalidate = 3600
8+
79
function findAuthorById(posts: Awaited<ReturnType<typeof getAllPostMeta>>, id: string) {
810
for (const p of posts) {
911
if (p.author.id === id) return p.author

apps/sim/app/(landing)/blog/page.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import type { Metadata } from 'next'
22
import { getAllPostMeta } from '@/lib/blog/registry'
33
import { StudioContent } from '@/app/(landing)/blog/studio-content'
44

5+
export const revalidate = 3600
6+
57
export const metadata: Metadata = {
68
title: 'Blog',
79
description: 'Announcements, insights, and guides from the Sim team.',

apps/sim/lib/blog/registry.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export async function getAllPostMeta(): Promise<BlogMeta[]> {
8484
}
8585

8686
export async function getPostMetaBySlug(slug: string): Promise<BlogMeta | null> {
87-
const meta = await scanFrontmatters()
87+
const meta = await getAllPostMeta()
8888
return meta.find((m) => m.slug === slug) ?? null
8989
}
9090

0 commit comments

Comments
 (0)