martyone
2025-10-02 f14260b2ba9986d008c1c89249be9cbf7f3b8acf
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.
1 files modified
6 ■■■■■ changed files
quartz/plugins/transformers/oxhugofm.ts 6 ●●●●● patch | view | raw | blame | history
quartz/plugins/transformers/oxhugofm.ts
@@ -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 @@
      }
      return src
    },
    htmlPlugins() {
      const plugins: PluggableList = [rehypeRaw]
      return plugins
    },
  }
}