fix(oxhugo): Do not discard embedded HTML (#2151)

In 'processors/parse.ts' the 'remarkRehype' plugin is used with
'allowDangerousHtml' enabled, but that needs to be combined with (e.g.)
'rehypeRaw' to have any effect on the output.
This commit is contained in:
martyone
2025-10-02 19:51:40 +02:00
committed by GitHub
parent 9ad3481da6
commit f14260b2ba

View File

@@ -1,4 +1,6 @@
import { QuartzTransformerPlugin } from "../types"
import rehypeRaw from "rehype-raw"
import { PluggableList } from "unified"
export interface Options {
/** Replace {{ relref }} with quartz wikilinks []() */
@@ -102,5 +104,9 @@ export const OxHugoFlavouredMarkdown: QuartzTransformerPlugin<Partial<Options>>
}
return src
},
htmlPlugins() {
const plugins: PluggableList = [rehypeRaw]
return plugins
},
}
}