pub struct CompileConfig {Show 18 fields
pub markdown_gfm: bool,
pub emit_html: bool,
pub emit_body: bool,
pub mdx_minify: bool,
pub mdx_output_format: Option<String>,
pub markdown_remark_plugins: Vec<Value>,
pub markdown_rehype_plugins: Vec<Value>,
pub mdx_remark_plugins: Vec<Value>,
pub mdx_rehype_plugins: Vec<Value>,
pub copy_linked_files: bool,
pub output_assets: Option<String>,
pub output_base: Option<String>,
pub pretty_code: Option<PrettyCodeOptions>,
pub mermaid: Option<MermaidOptions>,
pub math_engine: Option<MathEngine>,
pub force_sidecar: bool,
pub allow_dangerous_html: bool,
pub prefer_sidecar: Vec<String>,
}Fields§
§markdown_gfm: bool§emit_html: bool§emit_body: bool§mdx_minify: bool§mdx_output_format: Option<String>§markdown_remark_plugins: Vec<Value>§markdown_rehype_plugins: Vec<Value>§mdx_remark_plugins: Vec<Value>§mdx_rehype_plugins: Vec<Value>§copy_linked_files: bool§output_assets: Option<String>§output_base: Option<String>§pretty_code: Option<PrettyCodeOptions>None = bundled defaults (Catppuccin Latte/Mocha, CSS-vars output).
mermaid: Option<MermaidOptions>None = bundled defaults (light+dark, htmlLabels:false, responsive SVG).
math_engine: Option<MathEngine>None = KaTeX (rehype-katex parity); Some(Mathml) = pulldown-latex (fast).
force_sidecar: boolForce every listed JS plugin to the sidecar; drop every native transformer.
allow_dangerous_html: boolSEC-010: raw embedded HTML passthrough (CommonMark “unsafe” mode).
When false (the default), attacker-supplied <script> / <iframe>
/ on*= markup is NOT emitted verbatim into the HTML or MDX output —
block-level raw HTML is dropped and inline raw HTML is escaped to
visible text. Set true only when the caller fully trusts the input.
prefer_sidecar: Vec<String>Per-plugin sidecar override. Recognised entries: “remark-gfm”, “remark-math”, “remark-emoji”, “rehype-pretty-code”, “shiki”, “rehype-katex”, “rehype-mathjax”, “rehype-slug”, “rehype-autolink-headings”.
Implementations§
Source§impl CompileConfig
impl CompileConfig
pub fn new() -> Self
pub fn has_js_plugins(&self) -> bool
Sourcepub fn effective_markdown_remark_plugins(&self) -> Vec<Value>
pub fn effective_markdown_remark_plugins(&self) -> Vec<Value>
Drops JS plugins owned by an in-process transformer. When the matching feature is off, the plugin stays in the list and the sidecar runs it.
pub fn effective_mdx_remark_plugins(&self) -> Vec<Value>
pub fn effective_markdown_rehype_plugins(&self) -> Vec<Value>
pub fn effective_mdx_rehype_plugins(&self) -> Vec<Value>
Sourcepub fn for_render(&self) -> Self
pub fn for_render(&self) -> Self
Per-file config: native HTML off when sidecar will run.
Sourcepub fn pipeline_config(&self, path: &Path) -> PipelineConfig
pub fn pipeline_config(&self, path: &Path) -> PipelineConfig
path resolves relative assets for copy-linked-files.
Trait Implementations§
Source§impl Clone for CompileConfig
impl Clone for CompileConfig
Source§fn clone(&self) -> CompileConfig
fn clone(&self) -> CompileConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CompileConfig
impl Debug for CompileConfig
Source§impl Default for CompileConfig
impl Default for CompileConfig
Source§impl<'de> Deserialize<'de> for CompileConfigwhere
CompileConfig: Default,
impl<'de> Deserialize<'de> for CompileConfigwhere
CompileConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for CompileConfig
impl RefUnwindSafe for CompileConfig
impl Send for CompileConfig
impl Sync for CompileConfig
impl Unpin for CompileConfig
impl UnsafeUnpin for CompileConfig
impl UnwindSafe for CompileConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more