A MoonBit-first documentation site toolkit for package authors.
///|
let guide : @moondockit.DocPage = {
title: "Quick Start",
slug: "quick-start",
source: "# Quick Start\n\nBuild MoonBit documentation.",
}
///|
let site : @moondockit.DocSite = { title: "Package Docs", pages: [guide] }
///|
let files = @moondockit.build_site_manifest(site)///|
let api_page = @moondockit.mbti_to_page(interface_source)pub(all) struct AnchoredHeading {
level : Int
title : String
anchor : String
}pub(all) struct ApiSymbol {
kind : String
name : String
signature : String
arity : Int
return_type : String
}pub(all) struct BuildReport {
file_count : Int
html_count : Int
data_count : Int
total_bytes : Int
files : Array[OutputFileInfo]
}pub(all) enum DiagnosticLevel {
DiagError
DiagWarning
}pub(all) struct DocPage {
title : String
slug : String
source : String
}pub(all) struct DocumentMetrics {
heading_count : Int
paragraph_count : Int
list_item_count : Int
code_block_count : Int
word_count : Int
reading_minutes : Int
}pub(all) enum MarkdownBlock {
Heading(Int, String)
Paragraph(String)
UnorderedList(Array[String])
BlockQuote(String)
CodeBlock(String, String)
}pub(all) struct OutputFile {
path : String
content : String
}pub(all) struct OutputFileInfo {
path : String
kind : String
byte_count : Int
}pub(all) struct QualityCheck {
name : String
passed : Bool
message : String
}pub(all) struct RenderedPage {
path : String
html : String
}pub(all) struct RouteEntry {
title : String
slug : String
path : String
order : Int?
tags : Array[String]
}pub(all) struct SiteDiagnostic {
level : DiagnosticLevel
code : String
message : String
page : String?
}pub(all) struct SiteMetrics {
page_count : Int
heading_count : Int
code_block_count : Int
word_count : Int
reading_minutes : Int
}pub(all) struct SiteOptions {
language : String
description : String
site_url : String
footer : String
}pub(all) struct SiteSummary {
page_count : Int
output_count : Int
search_entry_count : Int
tag_count : Int
}pub(all) struct SiteTheme {
background : String
surface : String
text : String
accent : String
border : String
code_background : String
code_text : String
sidebar_width_px : Int
content_width_px : Int
}pub(all) struct TocItem {
level : Int
title : String
anchor : String
}fn build_robots_txt() -> Stringfn build_site_manifest_with_options(site : DocSite, theme : SiteTheme, options : SiteOptions) -> Array[OutputFile]fn render_markdown(markdown : String) -> Stringfn render_page_with_options(site : DocSite, page : DocPage, theme : SiteTheme, options : SiteOptions) -> RenderedPagefn render_site_with_options(site : DocSite, theme : SiteTheme, options : SiteOptions) -> Array[RenderedPage]fn slugify(title : String) -> StringA MoonBit-first documentation site toolkit for package authors.