pub struct HeadingInputs<'a> {
pub file_path: &'a str,
pub frontmatter_title: Option<&'a str>,
pub body_markdown: &'a str,
pub root_folder_name: Option<&'a str>,
pub is_home_override: bool,
pub slot_only: bool,
}Expand description
Inputs to the heading rule.
Fields§
§file_path: &'a str§frontmatter_title: Option<&'a str>Frontmatter title: value verbatim. None is “field missing”
(filename-mode); Some(""), Some(" ") is “explicitly empty”
(Title source, invisible).
body_markdown: &'a strRaw markdown body (post-frontmatter). Used to detect a leading
:::hero block — when present, the hero owns the heading slot and
the auto-injected H1 is suppressed regardless of title.
root_folder_name: Option<&'a str>The project’s root folder name (the user’s vault directory basename).
Used as a fallback for self-named-folder-note detection when the
file is at the project root: <root>/<root>.md and <root>/index.md
both render the project’s homepage, but Path::parent() returns
the empty path for root-level files, so the path-based check can’t
see the folder name. Editor and pipeline both pass the basename of
the open project folder. Pass None if unknown (filename
detection still catches index.md / README.md / language-suffixed
indexes).
is_home_override: booltrue iff the file is promoted to its folder’s home via the
home: true frontmatter marker (issue #587). Pipeline-only input;
editor passes false.
slot_only: booltrue iff the file is a layout-slot source (e.g. root footer.md)
rather than an article. Slot files are embedded as fragments into a
surrounding layout; the auto-injected <h1 class="moss-article-title">
would render as an unwanted heading inside that fragment. PR7b
(moss#599) replaces the pre-2026-05-28 frontmatter-synthesis hack
(title: "" injected at the call site to drive empty_title=true)
with this structural input. Editor passes false.
Trait Implementations§
Source§impl<'a> Clone for HeadingInputs<'a>
impl<'a> Clone for HeadingInputs<'a>
Source§fn clone(&self) -> HeadingInputs<'a>
fn clone(&self) -> HeadingInputs<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more