pub struct MD057Config {
pub absolute_links: AbsoluteLinksOption,
pub compact_paths: bool,
pub search_paths: Vec<String>,
}Expand description
Configuration for MD057 (relative link validation)
This rule validates that relative links point to existing files.
Fields§
§absolute_links: AbsoluteLinksOptionHow to handle absolute links (paths starting with /)
- “ignore” (default): Skip validation for absolute links
- “warn”: Report a warning for absolute links
- “relative_to_docs”: Resolve relative to MkDocs docs_dir and validate
compact_paths: boolWarn when relative links contain unnecessary path traversal.
When enabled, ../sub_dir/file.md from within sub_dir/ warns
and suggests the shorter equivalent file.md.
search_paths: Vec<String>Additional directories to search when a relative link is not found relative to the file’s directory.
Paths are resolved relative to the project root (where .rumdl.toml or
pyproject.toml is found), or relative to the current working directory.
For Obsidian users: the attachment folder is auto-detected from
.obsidian/app.json when flavor = "obsidian" is set, so this option
is typically not needed. Use it for custom setups or non-Obsidian tools.
Example:
[MD057]
search-paths = ["assets", "images", "attachments"]Trait Implementations§
Source§impl Clone for MD057Config
impl Clone for MD057Config
Source§fn clone(&self) -> MD057Config
fn clone(&self) -> MD057Config
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MD057Config
impl Debug for MD057Config
Source§impl Default for MD057Config
impl Default for MD057Config
Source§fn default() -> MD057Config
fn default() -> MD057Config
Source§impl<'de> Deserialize<'de> for MD057Configwhere
MD057Config: Default,
impl<'de> Deserialize<'de> for MD057Configwhere
MD057Config: 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>,
Source§impl PartialEq for MD057Config
impl PartialEq for MD057Config
Source§impl RuleConfig for MD057Config
impl RuleConfig for MD057Config
Source§impl Serialize for MD057Config
impl Serialize for MD057Config
impl StructuralPartialEq for MD057Config
Auto Trait Implementations§
impl Freeze for MD057Config
impl RefUnwindSafe for MD057Config
impl Send for MD057Config
impl Sync for MD057Config
impl Unpin for MD057Config
impl UnsafeUnpin for MD057Config
impl UnwindSafe for MD057Config
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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