From acc3527a7a7279a8efd209022e50e32190b703dd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 18 Jan 2026 00:00:22 +0000 Subject: [PATCH 1/2] Initial plan From dcd125d83d003c924d887ed7c521284b1ad65484 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 18 Jan 2026 00:11:04 +0000 Subject: [PATCH 2/2] Configure remark plugins for admonition syntax support Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com> --- package.json | 1 + packages/site/source.config.ts | 3 +++ pnpm-lock.yaml | 45 ++++++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+) diff --git a/package.json b/package.json index 25dada8..f2c1e94 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "next": "16.1.2", "react": "^19.2.3", "react-dom": "^19.2.3", + "remark-directive": "^4.0.0", "server-only": "^0.0.1", "tailwind-merge": "^3.4.0" }, diff --git a/packages/site/source.config.ts b/packages/site/source.config.ts index 99fd4b0..a02cea7 100644 --- a/packages/site/source.config.ts +++ b/packages/site/source.config.ts @@ -2,6 +2,8 @@ import { defineConfig, defineDocs } from 'fumadocs-mdx/config'; import { siteConfig } from './lib/site-config'; import path from 'node:path'; import fs from 'node:fs'; +import remarkDirective from 'remark-directive'; +import { remarkDirectiveAdmonition } from 'fumadocs-core/mdx-plugins'; function resolveContentDir(dir: string) { if (process.env.DOCS_DIR && dir === 'content/docs') return process.env.DOCS_DIR; @@ -24,6 +26,7 @@ export const { docs, meta } = defineDocs({ export default defineConfig({ mdxOptions: { + remarkPlugins: [remarkDirective, remarkDirectiveAdmonition], rehypeCodeOptions: { theme: siteConfig.content.codeBlock.theme, } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9f7f649..2fcbc8d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -32,6 +32,9 @@ importers: react-dom: specifier: ^19.2.3 version: 19.2.3(react@19.2.3) + remark-directive: + specifier: ^4.0.0 + version: 4.0.0 server-only: specifier: ^0.0.1 version: 0.0.1 @@ -1577,6 +1580,9 @@ packages: resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} engines: {node: '>= 0.4'} + mdast-util-directive@3.1.0: + resolution: {integrity: sha512-I3fNFt+DHmpWCYAT7quoM6lHf9wuqtI+oCOfvILnoicNIqjh5E3dEJWiXuYME2gNe8vl1iMQwyUHa7bgFmak6Q==} + mdast-util-find-and-replace@3.0.2: resolution: {integrity: sha512-Tmd1Vg/m3Xz43afeNxDIhWRtFZgM2VLyaf4vSTYwudTyeuTneoL3qtWMA5jeLyz/O1vDJmmV4QuScFCA2tBPwg==} @@ -1628,6 +1634,9 @@ packages: micromark-core-commonmark@2.0.3: resolution: {integrity: sha512-RDBrHEMSxVFLg6xvnXmb1Ayr2WzLAWjeSATAoxwKYJV94TeNavgoIdA0a9ytzDSVzBy2YKFK+emCPOEibLeCrg==} + micromark-extension-directive@4.0.0: + resolution: {integrity: sha512-/C2nqVmXXmiseSSuCdItCMho7ybwwop6RrrRPk0KbOHW21JKoCldC+8rFOaundDoRBUWBnJJcxeA/Kvi34WQXg==} + micromark-extension-gfm-autolink-literal@2.1.0: resolution: {integrity: sha512-oOg7knzhicgQ3t4QCjCWgTmfNhvQbDDnJeVu9v81r7NltNCVmhPy1fJRX27pISafdjL+SVc4d3l48Gb6pbRypw==} @@ -1922,6 +1931,9 @@ packages: rehype-recma@1.0.0: resolution: {integrity: sha512-lqA4rGUf1JmacCNWWZx0Wv1dHqMwxzsDWYMTowuplHF3xH0N/MmrZ/G3BDZnzAkRmxDadujCjaKM2hqYdCBOGw==} + remark-directive@4.0.0: + resolution: {integrity: sha512-7sxn4RfF1o3izevPV1DheyGDD6X4c9hrGpfdUpm7uC++dqrnJxIZVkk7CoKqcLm0VUMAuOol7Mno3m6g8cfMuA==} + remark-gfm@4.0.1: resolution: {integrity: sha512-1quofZ2RQ9EWdeN34S79+KExV1764+wCUGop5CPL1WGdD0ocPpu91lzPGbwWMECpEpd42kJGQwzRfyov9j4yNg==} @@ -3446,6 +3458,20 @@ snapshots: math-intrinsics@1.1.0: {} + mdast-util-directive@3.1.0: + dependencies: + '@types/mdast': 4.0.4 + '@types/unist': 3.0.3 + ccount: 2.0.1 + devlop: 1.1.0 + mdast-util-from-markdown: 2.0.2 + mdast-util-to-markdown: 2.1.2 + parse-entities: 4.0.2 + stringify-entities: 4.0.4 + unist-util-visit-parents: 6.0.2 + transitivePeerDependencies: + - supports-color + mdast-util-find-and-replace@3.0.2: dependencies: '@types/mdast': 4.0.4 @@ -3628,6 +3654,16 @@ snapshots: micromark-util-symbol: 2.0.1 micromark-util-types: 2.0.2 + micromark-extension-directive@4.0.0: + dependencies: + devlop: 1.1.0 + micromark-factory-space: 2.0.1 + micromark-factory-whitespace: 2.0.1 + micromark-util-character: 2.1.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + parse-entities: 4.0.2 + micromark-extension-gfm-autolink-literal@2.1.0: dependencies: micromark-util-character: 2.1.1 @@ -4071,6 +4107,15 @@ snapshots: transitivePeerDependencies: - supports-color + remark-directive@4.0.0: + dependencies: + '@types/mdast': 4.0.4 + mdast-util-directive: 3.1.0 + micromark-extension-directive: 4.0.0 + unified: 11.0.5 + transitivePeerDependencies: + - supports-color + remark-gfm@4.0.1: dependencies: '@types/mdast': 4.0.4