Skip to content

Commit 5c44211

Browse files
committed
Correctly exclude presentation comments
1 parent c8b6607 commit 5c44211

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

website/docusaurus.config.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,16 @@ const config: Config = {
6767

6868
markdown: {
6969
mermaid: true,
70+
preprocessor: ({ fileContent }) => {
71+
// Strip presentation-only blocks entirely (for presentations, not docs)
72+
let result = fileContent.replace(
73+
/<!--\s*presentation-only-start\s*-->[\s\S]*?<!--\s*presentation-only-end\s*-->/g,
74+
''
75+
);
76+
// Strip doc-only markers (keep content)
77+
result = result.replace(/<!--\s*doc-only-(start|end)\s*-->\n?/g, '');
78+
return result;
79+
},
7080
},
7181

7282
presets: [

0 commit comments

Comments
 (0)