MoonDocKit is a MoonBit-first documentation site toolkit for package authors.
It turns package notes and guides into small static HTML documentation sites
with safe HTML escaping, stable anchors, navigation, and testable rendering
logic.
This repository is being developed for the 2026 MoonBit Open Source Competition.
The project is intentionally scoped as an ecosystem tool rather than another
standalone Markdown parser: the long-term goal is to help MoonBit package
authors publish clear docs, examples, API guides, and release notes with a
simple MoonBit workflow.
The CLI reads every .md file, evaluates the quality gate, and writes a root
index.html, documentation pages, an interactive search experience backed by
search-index.json, plus sitemap.xml, robots.txt, site-manifest.json,
and quality-report.json.
For repeatable project builds, put the same fields in JSON and pass --config:
moon run --target js cmd/moondockit --config examples/moondockit.json
The example configuration is documented in docs/configuration.md, and
examples/moondockit.schema.json describes the supported fields for editor
hints and review.
The CLI exposes source, output, language, description, footer, canonical URL,
and optional .mbti API inputs. Command-line options override config-file
values. The compiled Node.js CLI returns non-zero process exit codes for
invalid arguments and failed quality gates. Add --strict when CI should fail
on validation warnings before any output is written; without --strict, warning
diagnostics are printed while successful builds still complete. Add --dry-run
to validate and report planned output files without writing the output
directory.
Include generated MoonBit package API documentation:
moon info
moon run --target js cmd/moondockit \
--source examples/site \
--api pkg.generated.mbti \
--output dist-api \
--title "MoonDocKit"
The .mbti parser extracts public functions, structs, enums, and traits into a
searchable API reference page. It also derives a compact API summary, function
parameter counts, return types, per-symbol anchors, and a grouped symbol index
from signatures so the generated reference is useful during review instead of
being only a raw declaration dump. This keeps the generated documentation
aligned with the package interface produced by the MoonBit toolchain.
MoonDocKit is now an end-to-end documentation toolkit for the MoonBit
ecosystem and has been published to mooncakes.io as Estrella-11/moondockit.
The next milestones focus on award-level evidence and adoption quality:
Add source spans and richer inline nodes to the Markdown AST.
Add a real MoonBit package adoption case with before/after documentation
output.
Improve filesystem diagnostics for common CLI mistakes.
Add additional focused theme presets after the package and API reference
presets.
Turn reviewer feedback into small, well-tested release increments.
Competition Fit
The competition charter asks for projects that are real, reusable, testable,
maintainable, and valuable to the MoonBit open-source ecosystem. MoonDocKit
targets a common ecosystem gap: package authors need a simple way to turn
MoonBit project documentation into browsable static sites without leaving the
MoonBit toolchain.
See docs/ecosystem-impact.md for the award-oriented ecosystem contribution
summary.
MoonDocKit
MoonDocKit is a MoonBit-first documentation site toolkit for package authors. It turns package notes and guides into small static HTML documentation sites with safe HTML escaping, stable anchors, navigation, and testable rendering logic.
This repository is being developed for the 2026 MoonBit Open Source Competition. The project is intentionally scoped as an ecosystem tool rather than another standalone Markdown parser: the long-term goal is to help MoonBit package authors publish clear docs, examples, API guides, and release notes with a simple MoonBit workflow.
Repository mirrors:
Public showcase: https://estrella-11.github.io/moonbit_1/
Generated MoonBit API:
dist-cli-example/api-reference.htmlCurrent Features
.mbtipublic API extraction and reference-page generation.site-manifest.jsonandquality-report.jsongeneration for deploy, acceptance, and reviewer evidence checks.index.htmlgeneration for direct static-host deployment.cmd/main.Quick Start
The demo prints generated output files, summary metadata, and validation diagnostics for an in-memory documentation site.
Build the included Markdown example with the MoonBit CLI:
The CLI reads every
.mdfile, evaluates the quality gate, and writes a rootindex.html, documentation pages, an interactive search experience backed bysearch-index.json, plussitemap.xml,robots.txt,site-manifest.json, andquality-report.json.For repeatable project builds, put the same fields in JSON and pass
--config:The example configuration is documented in
docs/configuration.md, andexamples/moondockit.schema.jsondescribes the supported fields for editor hints and review.The CLI exposes source, output, language, description, footer, canonical URL, and optional
.mbtiAPI inputs. Command-line options override config-file values. The compiled Node.js CLI returns non-zero process exit codes for invalid arguments and failed quality gates. Add--strictwhen CI should fail on validation warnings before any output is written; without--strict, warning diagnostics are printed while successful builds still complete. Add--dry-runto validate and report planned output files without writing the output directory.Include generated MoonBit package API documentation:
The
.mbtiparser extracts public functions, structs, enums, and traits into a searchable API reference page. It also derives a compact API summary, function parameter counts, return types, per-symbol anchors, and a grouped symbol index from signatures so the generated reference is useful during review instead of being only a raw declaration dump. This keeps the generated documentation aligned with the package interface produced by the MoonBit toolchain.Reviewer Path
For competition review, start with:
docs/final-submission.mddocs/final-acceptance.mddocs/reviewer-scorecard.mddocs/acceptance-guide.mddocs/release.mddist-exampledist-cli-example/overview.htmldist-cli-example/api-reference.htmldist-cli-example/quality-report.jsonCompetition Materials
docs/MoonDocKit-project-proposal-appendix-template.pdfdocs/competition-plan.mddocs/acceptance-checklist.mddocs/acceptance-guide.mddocs/final-acceptance.mddocs/reviewer-scorecard.mddocs/feature-evidence-map.mddocs/reviewer-faq.mddocs/final-submission.mddocs/release.mddocs/architecture.mddocs/accessibility-notes.mddocs/security-model.mdSECURITY.mddocs/maintenance-plan.mddocs/change-impact-matrix.mdCONTRIBUTING.mdCODE_OF_CONDUCT.mdSUPPORT.mddocs/demo-script.mddocs/deployment-runbook.mddocs/configuration.mddocs/adoption-playbook.mddocs/ecosystem-impact.mddocs/windows-toolchain-troubleshooting.mddocs/mooncakes-publishing.mddocs/award-sprint.mddocs/development-log.mddocs/benchmark-notes.mdexamples/sitedist-exampledist-cli-exampleexamples/adoption-packagedist-adoption-exampleAward Sprint Direction
MoonDocKit is now an end-to-end documentation toolkit for the MoonBit ecosystem and has been published to mooncakes.io as
Estrella-11/moondockit. The next milestones focus on award-level evidence and adoption quality:Competition Fit
The competition charter asks for projects that are real, reusable, testable, maintainable, and valuable to the MoonBit open-source ecosystem. MoonDocKit targets a common ecosystem gap: package authors need a simple way to turn MoonBit project documentation into browsable static sites without leaving the MoonBit toolchain.
See
docs/ecosystem-impact.mdfor the award-oriented ecosystem contribution summary.License
Apache-2.0.