Skip to content
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
5 changes: 4 additions & 1 deletion apps/sim/app/(landing)/studio/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export default async function Page({ params }: { params: Promise<{ slug: string
width={450}
height={360}
className='h-auto w-full'
sizes='(max-width: 768px) 100vw, 450px'
priority
itemProp='image'
/>
Expand Down Expand Up @@ -131,7 +132,7 @@ export default async function Page({ params }: { params: Promise<{ slug: string
{related.length > 0 && (
<div className='mx-auto max-w-[900px] px-6 pb-24 sm:px-8 md:px-12'>
<h2 className='mb-4 font-medium text-[24px]'>Related posts</h2>
<div className='grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3'>
<div className='grid grid-cols-1 gap-4 sm:grid-cols-2 sm:gap-6 lg:grid-cols-3'>
{related.map((p) => (
<Link key={p.slug} href={`/studio/${p.slug}`} className='group'>
<div className='overflow-hidden rounded-lg border border-gray-200'>
Expand All @@ -141,6 +142,8 @@ export default async function Page({ params }: { params: Promise<{ slug: string
width={600}
height={315}
className='h-[160px] w-full object-cover'
sizes='(max-width: 640px) 100vw, (max-width: 1024px) 50vw, 33vw'
loading='lazy'
/>
<div className='p-3'>
<div className='mb-1 text-gray-600 text-xs'>
Expand Down
4 changes: 3 additions & 1 deletion apps/sim/app/(landing)/studio/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export default async function StudioIndex({
</div> */}

{/* Grid layout for consistent rows */}
<div className='grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3'>
<div className='grid grid-cols-1 gap-4 md:grid-cols-2 md:gap-6 lg:grid-cols-3'>
{posts.map((p, i) => {
return (
<Link key={p.slug} href={`/studio/${p.slug}`} className='group flex flex-col'>
Expand All @@ -74,6 +74,8 @@ export default async function StudioIndex({
width={800}
height={450}
className='h-48 w-full object-cover'
sizes='(max-width: 768px) 100vw, (max-width: 1024px) 50vw, 33vw'
loading='lazy'
/>
<div className='flex flex-1 flex-col p-4'>
<div className='mb-2 text-gray-600 text-xs'>
Expand Down
53 changes: 32 additions & 21 deletions apps/sim/app/sitemap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,45 +4,56 @@ import { getAllPostMeta } from '@/lib/blog/registry'
export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
const baseUrl = 'https://sim.ai'

const staticPages = [
const now = new Date()

const staticPages: MetadataRoute.Sitemap = [
{
url: baseUrl,
lastModified: new Date(),
changeFrequency: 'daily' as const,
priority: 1,
lastModified: now,
priority: 1.0, // Homepage - highest priority
},
{
url: `${baseUrl}/studio`,
lastModified: now,
priority: 0.9, // Blog index - high value content
},
{
url: `${baseUrl}/studio/tags`,
lastModified: now,
priority: 0.7, // Tags page - discovery/navigation
},
{
url: `${baseUrl}/templates`,
lastModified: now,
priority: 0.8, // Templates - important discovery page
},
{
url: `${baseUrl}/signup`,
lastModified: new Date(),
changeFrequency: 'weekly' as const,
priority: 0.9,
url: `${baseUrl}/changelog`,
lastModified: now,
priority: 0.8, // Changelog - important for users
},
{
url: `${baseUrl}/login`,
lastModified: new Date(),
changeFrequency: 'monthly' as const,
priority: 0.8,
url: `${baseUrl}/careers`,
lastModified: new Date('2024-10-06'),
priority: 0.6, // Careers - important but not core content
},
{
url: `${baseUrl}/terms`,
lastModified: new Date(),
changeFrequency: 'monthly' as const,
priority: 0.5,
lastModified: new Date('2024-10-14'),
priority: 0.5, // Terms - utility page
},
{
url: `${baseUrl}/privacy`,
lastModified: new Date(),
changeFrequency: 'monthly' as const,
priority: 0.5,
lastModified: new Date('2024-10-14'),
priority: 0.5, // Privacy - utility page
},
]

const posts = await getAllPostMeta()
const blogPages = posts.map((p) => ({
const blogPages: MetadataRoute.Sitemap = posts.map((p) => ({
url: p.canonical,
lastModified: new Date(p.updated ?? p.date),
changeFrequency: 'monthly' as const,
priority: 0.9 as const,
priority: 0.9, // Blog posts - high value content
}))

return [...staticPages, ...blogPages]
Expand Down
2 changes: 2 additions & 0 deletions apps/sim/lib/blog/mdx.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ export const mdxComponents: MDXRemoteProps['components'] = {
width={props.width ? Number(props.width) : 800}
height={props.height ? Number(props.height) : 450}
className={clsx('h-auto w-full rounded-lg', props.className)}
sizes='(max-width: 768px) 100vw, 800px'
loading='lazy'
/>
),
h2: (props: any) => (
Expand Down
2 changes: 1 addition & 1 deletion apps/sim/tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,5 +162,5 @@ export default {
},
},
},
plugins: [require('tailwindcss-animate')],
plugins: [require('tailwindcss-animate'), require('@tailwindcss/typography')],
} satisfies Config
7 changes: 6 additions & 1 deletion bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"@biomejs/biome": "2.0.0-beta.5",
"@next/env": "15.4.1",
"@octokit/rest": "^21.0.0",
"@tailwindcss/typography": "0.5.19",
"drizzle-kit": "^0.31.4",
"husky": "9.1.7",
"lint-staged": "16.0.0",
Expand Down