feat: client-side Mermaid diagram rendering with interactive viewer
Render mermaid code blocks as SVG diagrams instead of syntax-highlighted source code. Includes a full pan/zoom viewer with drag, scroll wheel zoom, pinch-to-zoom, fit-to-view, and fullscreen support. Theme-aware (dark/light). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -12,6 +12,7 @@ import { SectionDivider } from '@/components/section-divider';
|
||||
import { JsonLd } from '@/components/json-ld';
|
||||
import { DevEnvDeviceHero } from '@/components/dev-env-device-hero';
|
||||
import { HomeLabDeviceHero } from '@/components/homelab-device-hero';
|
||||
import { MermaidRenderer } from '@/components/mermaid-renderer';
|
||||
|
||||
export function generateStaticParams() {
|
||||
const params = allPages.map((page) => ({
|
||||
@@ -137,6 +138,7 @@ export default async function StaticPage({ params }: Props) {
|
||||
)
|
||||
)}
|
||||
<div dangerouslySetInnerHTML={{ __html: page.body.html }} />
|
||||
<MermaidRenderer />
|
||||
</article>
|
||||
</ScrollReveal>
|
||||
</SectionDivider>
|
||||
|
||||
Reference in New Issue
Block a user