mirror of
https://github.com/joelhooks/joelclaw.git
synced 2026-09-19 01:24:04 +08:00
4b1e5fc527
- Dank Mono woff2 (Regular, Italic, Bold) loaded as --font-dank-mono - rehype-pretty-code theme switched to catppuccin-macchiato - Code blocks: Dank Mono with ligatures, rounded borders, relaxed leading - Inline code: hot pink text on subtle dark bg - --font-code CSS variable with Dank Mono → Geist Mono fallback
33 lines
1.2 KiB
TypeScript
33 lines
1.2 KiB
TypeScript
import remarkGfm from "remark-gfm";
|
|
import remarkSmartypants from "remark-smartypants";
|
|
import rehypeSlug from "rehype-slug";
|
|
import rehypeAutolinkHeadings from "rehype-autolink-headings";
|
|
import rehypePrettyCode from "rehype-pretty-code";
|
|
import rehypeExternalLinks from "rehype-external-links";
|
|
import rehypeUnwrapImages from "rehype-unwrap-images";
|
|
import type { Options as PrettyCodeOptions } from "rehype-pretty-code";
|
|
|
|
const prettyCodeOptions: PrettyCodeOptions = {
|
|
theme: {
|
|
dark: "catppuccin-macchiato",
|
|
light: "catppuccin-macchiato",
|
|
},
|
|
keepBackground: true,
|
|
defaultLang: {
|
|
block: "text",
|
|
},
|
|
};
|
|
|
|
export const remarkPlugins: any[] = [
|
|
remarkGfm, // tables, strikethrough, autolinks, task lists
|
|
remarkSmartypants, // smart quotes, em dashes, ellipses
|
|
];
|
|
|
|
export const rehypePlugins: any[] = [
|
|
rehypeSlug, // id attributes on headings
|
|
[rehypeAutolinkHeadings, { behavior: "wrap" }], // clickable heading links
|
|
[rehypePrettyCode, prettyCodeOptions], // shiki syntax highlighting
|
|
[rehypeExternalLinks, { target: "_blank", rel: ["noopener", "noreferrer"] }], // external link handling
|
|
rehypeUnwrapImages, // remove <p> wrapper around images
|
|
];
|