Expand description
mbr-core — the render core of mbr, the markdown browser.
Markdown rendering, templates, configuration, the repository scan, search,
the task/link/tag indexes and the embedded web assets. Everything here is
pure or touches the filesystem only at its edges; there is no HTTP server,
file watcher, CLI, GUI or static-site generator in this crate, and the
compiler enforces it: those live in mbr-server, mbr-ssg and the mbr
binary, which depend on this crate and never the other way round. This is
what the QuickLook staticlib (mbr-ffi) and a mobile shell build on.
The one optional subsystem is media-metadata (ffmpeg/pdfium probes and
the video transcode/remux pipeline), because the repository scan itself
reads media metadata when it is on.
Re-exports§
pub use config::Config;pub use config::RelationType;pub use config::SortField;pub use config::TagSource;pub use config::find_root_dir;pub use errors::BuildError;pub use errors::ConfigError;pub use errors::MbrError;pub use errors::SearchError;pub use errors::TaskIndexError;pub use markdown::MarkdownRenderResult;pub use markdown::ParsedDocument;pub use search::SearchEngine;pub use search::SearchQuery;pub use search::SearchResponse;pub use search::SearchResult;pub use search::SearchScope;pub use sorting::sort_files;pub use task_index::FileTasks;pub use task_index::TaskIndex;pub use task_query::DueBucket;pub use task_query::DueFilter;pub use task_query::IncludeFilter;pub use task_query::TaskGroup;pub use task_query::TaskMode;pub use task_query::TaskQuery;pub use task_query::TaskQueryResponse;pub use task_query::due_bucket;pub use task_query::parse_task_query;pub use task_query::run_query;pub use tasks::Annotations;pub use tasks::MarkerRule;pub use tasks::Task;pub use tasks::TaskKind;pub use tasks::TaskPriority;pub use tasks::TaskStatus;pub use tasks::parse_marker_line;pub use tasks::parse_task_line;pub use tasks::scan_source_tasks;pub use tasks::scan_source_tasks_with_markers;pub use tasks::set_marker;pub use tasks::strip_annotations;
Modules§
- assets
- Compiled-in default assets served under
/.mbr/*and copied into static builds. - attrs
- Attribute Parser Module
- audio
- cache
- Shared primitives for size-bounded in-memory caches.
- change_
event - File change events: what the watcher broadcasts and what the in-process writers (task toggles, edits, uploads, renames) announce.
- chat
```chatcode blocks: a conversation rendered as speech bubbles.- config
- constants
- Shared constants used across multiple modules.
- contact
- Contact model for
type: personandtype: organizationnotes. - edit_
auth - Authentication and hashing helpers for the in-browser editing endpoints.
- embedded_
hljs - Embedded highlight.js files for syntax highlighting.
- embedded_
katex - Embedded KaTeX files for math rendering.
- embedded_
pico - Embedded Pico CSS files for theme support.
- errors
- Centralized error types for the mbr markdown browser.
- flashcards
- Flashcard review history: the pure half of
POST /.mbr/flashcard-review. - html
- MBR HTML Renderer
- icons
- The icon set shared by templates and web components.
- link_
index - Link tracking module for bidirectional link management.
- link_
transform - Link transformation for trailing-slash URL convention.
- markdown
- media
- Media embedding detection and HTML generation for image syntax extensions.
- oembed
- oembed_
cache - OEmbed cache module for caching page metadata fetches.
- page_
context - Shared template-context assembly for server mode and static site builds.
- page_
errors - Per-page error detection for server/GUI mode.
- path_
resolver - Path resolution logic for the mbr server.
- readability
- Readability scoring utilities (Flesch Reading Ease and Flesch-Kincaid Grade Level).
- relationships
- Named, typed relationships between notes.
- repo
- search
- Search functionality for the mbr markdown browser.
- sorting
- Configurable file sorting for mbr.
- tag_
index - Tag index module for tracking tagged pages.
- task_
index - Lazy, in-memory index of the tasks contained in a repository’s markdown.
- task_
query - Pure filtering, grouping and counting for task queries.
- tasks
- Task Parsing Module
- templates
- url_
helpers - Pure, lexical URL helpers for page chrome: breadcrumbs, the “up” link, and
the relative prefixes a static page uses to reach
.mbr/and the site root. - url_
path - URL path primitives shared by the link pipeline.
- vault
- The storage seam: every repository-shaped read and write in the core goes
through a
Vault. - vid
- wikilink
- Wikilink parsing and transformation module.
- wikilink_
index - Global name index for body-wikilink (
[[Name]]) resolution.
Enums§
- Alignment
- Table column text alignment.
- Block
Quote Kind - BlockQuote kind (Note, Tip, Important, Warning, Caution).
- Code
Block Kind - Codeblock kind.
- Event
- Markdown events that are generated in a preorder traversal of the document
tree, with additional
Endevents whenever all of an inner node’s children have been visited. - Heading
Level - Tag
- Tags for elements that can contain other elements.
- TagEnd
- The end of a
Tag.
Functions§
- http_
client - Build a reqwest HTTP client with bundled Mozilla root certificates.
- http_
client_ builder - Returns a reqwest
ClientBuilderpre-configured with bundled Mozilla root certificates. This avoids reliance on the system certificate store, which may be absent in sandboxed or minimal Linux environments (e.g. Nix builds).