A modern documentation and static site generator for the MoonBit ecosystem, inspired by mdBook and Hakyll
moon add himeno/mopressmopress init
mopress build
mopress servetitle = "MoPress Doc"
description = "A modern documentation and static site generator for the MoonBit ecosystem, inspired by mdBook and Hakyll"
keywords = "Documentation,Static Site Generator,SSG,MoonBit,MoonLang,Moon,Functional,Haskell,mdBook,Hakyll"
favicon = "https://himeno-sena.com/favicon.ico"
logo = "https://himeno-sena.com/favicon.ico"
authors = ["Himeno Sena"]
language = "en"
src = "./"
dest = "./dest"
repository = "https://github.com/biyuehu/mopress"src/
├── SUMMARY.md
└── intro.mdmopress new my-book
cd my-book
moon run --target native site.mbtx build
moon run --target native site.mbtx serveimport {
"himeno/mopress/core",
"moonbitlang/async",
}
///|
async fn main {
@core.mopress([
Glob(
"**/*.md",
Text(raw => {
raw
|> @core.set_extension(".html")
|> @core.render_markdown_and_frontmatter
|> @core.load_and_apply_template("templates/default.html")
|> @core.use_js(["console.log('hi, moonbit! hi, mopress!')"])
|> @core.unify
}),
),
Glob("styles/**/*", Copy),
])
}async fn build_book(config : BookConfig, no_emit? : Bool, analyze? : Bool, analyze_json? : Bool) -> Unitasync fn process_markdown_page(raw : Item[String], config : BookConfig, summary : Summary, silent? : Bool) -> Item[Thing]Install
Download zipA modern documentation and static site generator for the MoonBit ecosystem, inspired by mdBook and Hakyll