feat: macros for posts to extend page functionality

This commit is contained in:
2026-02-12 16:02:34 +01:00
parent 5ed0371456
commit 5c6fcb46ef
10 changed files with 1266 additions and 0 deletions

View File

@@ -16,6 +16,9 @@ import type { RemarkPlugin } from '@milkdown/kit/transformer';
import type { Root, List, ListItem } from 'mdast';
import type { Plugin } from 'unified';
import { visit } from 'unist-util-visit';
import { macroPlugin } from '../../plugins/macroPlugin';
// Import macros module to register all macro definitions
import '../../macros';
import './MilkdownEditor.css';
// Remark plugin to force tight lists (no blank lines between list items)
@@ -217,6 +220,7 @@ const MilkdownProviderInner: React.FC<MilkdownEditorProps> = ({
})
.use(commonmark)
.use(gfm)
.use(macroPlugin)
.use(history)
.use(listener)
.use(clipboard)