File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
packages/myst-cli/src/build/jats Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,17 @@ import { resolveFrontmatterParts } from '../../utils/resolveFrontmatterParts.js'
1414import type { ExportWithOutput , ExportFnOptions } from '../types.js' ;
1515import { cleanOutput } from '../utils/cleanOutput.js' ;
1616import { getFileContent } from '../utils/getFileContent.js' ;
17+ import { mermaidPlugin } from '../../transforms/mermaid.js' ;
18+ import type { TransformSpec } from 'myst-common' ;
19+
20+ const mermaidTransform : TransformSpec = {
21+ name : 'mermaid' ,
22+ stage : 'document' ,
23+ plugin : mermaidPlugin ,
24+ options : {
25+ format : 'png' ,
26+ } ,
27+ } ;
1728
1829/**
1930 * Build a MyST project as JATS XML
@@ -39,6 +50,7 @@ export async function runJatsExport(
3950 projectPath,
4051 imageExtensions : KNOWN_IMAGE_EXTENSIONS ,
4152 extraLinkTransformers,
53+ transforms : [ mermaidTransform ] ,
4254 preFrontmatters : [
4355 filterKeys ( article , [ ...PAGE_FRONTMATTER_KEYS , ...Object . keys ( FRONTMATTER_ALIASES ) ] ) ,
4456 ] , // only apply to article, not sub_articles
You can’t perform that action at this time.
0 commit comments