Skip to main content

Crate markdown_compiler

Crate markdown_compiler 

Source
Expand description

Markdown content parsing, validation, discovery, asset resolution, and identity.

Re-exports§

pub use identity::AssetBindingTarget;
pub use identity::PostRendererIdentity;
pub use identity::RevisionIdentityError;
pub use identity::SiteShellRendererIdentity;
pub use identity::digest_asset;
pub use tree::ContentDepthLimit;
pub use tree::ContentEntryLimit;
pub use tree::ContentFileByteLimit;
pub use tree::ContentPathByteLimit;
pub use tree::ContentTreeByteLimit;
pub use tree::ContentTreeLimits;
pub use tree::ContentTreeLimitsError;
pub use tree::DiscoveredAsset;
pub use tree::DiscoveredContentTree;
pub use tree::DiscoveredPost;
pub use tree::DiscoveredPublication;
pub use tree::discover_content_tree;

Modules§

identity
tree

Structs§

AllowedOriginOrdinal
AssetDigest
AssetResolutionError
AssetResolutionErrors
AssetResolutionWarning
AssetResolutionWarnings
AuthorName
AuthorSettings
AuthoredMarkdownDestination
The destination value produced by the CommonMark parser for one occurrence.
ContentCandidateStore
ContentTreeDigest
Versioned identity of the exact managed inputs in one discovered content tree.
ContentValidationError
ContentValidationErrors
DigestedAsset
A local asset path paired with the digest of its exact bytes.
ExternalAssetOrigin
A normalized HTTPS origin used by the effective asset allowlist.
ExternalAssetOriginError
ExternalAssetUrl
A normalized external asset URL that is safe to include in revision input.
ExternalAssetUrlError
FieldPath
LogicalAssetPath
LogicalContentPath
MarkdownDestinationOrdinal
The one-based position of a link or image destination in a Markdown event stream.
MarkdownSource
MarkdownSourceRange
A half-open byte range in the exact Markdown source bound to a resolution.
PostAlias
PostDescription
PostDocument
PostId
PostIdParseError
PostMetadata
PostRevisionDigest
PostSlug
PostSource
PostTag
PostTitle
PreparedContent
An immutable, compiler-owned candidate with source-bound asset inputs.
PreparedContentView
Read-only compiler inputs for composition in a renderer.
PreparedPost
One validated document, its approved assets, and its cached content identity.
PreparedPostView
A borrowed post/asset pair that cannot mutate the prepared candidate.
PreviewDigest
PublicationAssetSettings
PublicationBaseUrl
PublicationBaseUrlError
PublicationSettings
PublicationSource
ResolvedLocalAsset
Exact discovered bytes paired with the resolver-calculated identity.
ResolvedLocalAssetStore
Immutable local bytes keyed by their portable logical path.
ResolvedMarkdownDestination
One resolver-approved Markdown asset destination.
ResolvedPostAssets
Resolver-owned, complete asset inputs for one post revision.
ResolvedSiteAssets
Resolver-owned, complete asset inputs for one site snapshot.
RetainedContentCandidate
RouteValueError
SiteDescription
SiteSettings
SiteSnapshotDigest
SiteTitle
UnresolvedAssetReference
UnresolvedHttpsOrigin
ValidatedContent
ValidationLocation

Enums§

AssetReferenceLocation
AssetResolutionCode
AssetResolutionWarningCode
AssetRevisionReference
A normalized local or external asset reference used by digest transcripts.
ContentCandidateStoreError
ContentTreeDigestParseError
ContentValidationCode
DefaultPostTipPolicy
DigestKind
DigestParseError
DraftStatus
LogicalTreePathError
MarkdownDestinationKind
PlainTextError
PostCollection
PostTipPolicy
PrepareContentError
ResolvedLocalAssetLookupError

Functions§

prepare_content
Parse and resolve one owned content tree without network I/O. The result keeps each validated document paired with its approved assets.
run
Runs the standalone single-document validator to completion.
validate_content
validate_post_document
Validate one Markdown post without requiring its diagnostic label to be a managed-tree path.
validate_post_document_bytes
Validate one Markdown post from raw bytes using the production default post byte limit and UTF-8 contract.