pub struct CompileConfig {Show 14 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 math_engine: Option<MathEngine>,
}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>Pretty-code highlighter config. None = bundled defaults
(Catppuccin Latte/Mocha pair, dark primary, multi-mode CSS-vars
output). Some = explicit theme spec.
math_engine: Option<MathEngine>LaTeX engine for $...$ / $$...$$. None = KaTeX (slow, exact
rehype-katex parity). Some(MathEngine::Mathml) = pulldown-latex
MathML (fast, plainer visuals).
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>
Plugin lists after stripping every JS plugin whose work is now done by an in-process transformer (pretty-code/shiki, math, emoji). Used both for the sidecar gate and for the request payload so the sidecar never duplicates work. When the matching feature is off, that plugin’s name is left 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 compile config: turns off native HTML when sidecar will run.
Sourcepub fn pipeline_config(&self, path: &Path) -> PipelineConfig
pub fn pipeline_config(&self, path: &Path) -> PipelineConfig
Build the PipelineConfig consumed by
[Pipeline::with_defaults_for]. path is the compiled file’s path,
used to resolve relative asset paths in the copy-linked-files
transformer.
Trait Implementations§
Source§impl Clone for CompileConfig
impl Clone for CompileConfig
Source§fn clone(&self) -> CompileConfig
fn clone(&self) -> CompileConfig
1.0.0 · 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,
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