Skip to content

Commit e213907

Browse files
Refactor blog system for interactive content support (#1023)
Introduces a registry for interactive blog posts, adds gradient backgrounds for posts without images, and refactors blog listing and rendering logic to support interactive content. Removes the dedicated Mac system audio blog page in favor of registry-driven rendering. Updates BlogTemplate for improved key usage, gradient support, and code consistency. Adds Windows 11 system audio blog content and utility for generating gradients.
1 parent 1580be2 commit e213907

File tree

9 files changed

+472
-170
lines changed

9 files changed

+472
-170
lines changed

apps/web/app/(site)/blog/[slug]/page.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,13 @@ import type { Metadata } from "next";
44
import Image from "next/image";
55
import { notFound } from "next/navigation";
66
import { MDXRemote } from "next-mdx-remote/rsc";
7+
import { BlogTemplate } from "@/components/blog/BlogTemplate";
78
import { ReadyToGetStarted } from "@/components/ReadyToGetStarted";
89
import { getBlogPosts } from "@/utils/blog";
10+
import {
11+
getInteractiveBlogContent,
12+
isInteractiveBlogPost,
13+
} from "@/utils/blog-registry";
914
import { calculateReadingTime } from "@/utils/readTime";
1015
import { Share } from "../_components/Share";
1116

@@ -67,6 +72,11 @@ export default async function PostPage({ params }: PostProps) {
6772
notFound();
6873
}
6974

75+
if (isInteractiveBlogPost(params.slug)) {
76+
const interactiveContent = getInteractiveBlogContent(params.slug);
77+
return <BlogTemplate content={interactiveContent} />;
78+
}
79+
7080
const readingTime = calculateReadingTime(post.content);
7181

7282
return (

apps/web/app/(site)/blog/record-screen-mac-system-audio/page.tsx

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)