git clone https://github.com/xz-xuezhe/moonblox
cd moonblox
# Scaffold a new site
moon run --target native cmd/moonblox -- init my-site
# Build and open
MOONBLOX_PATH=. moon run --target native cmd/moonblox -- build my-site
open my-site/dist/index.html
Project Structure
my-site/
posts/index.md # your Markdown content
components/
badge/ # @badge(text: "new", tone: "info")
counter/ # @counter(initial: 0)
callout/ # :::callout ... :::
theme/base.css # global styles
dist/ # built output
Components
A component is a directory under components/<name>/:
MoonBlox
Write Markdown. Embed MoonBit components. Ship interactive pages.
Features
@counter(initial: 0)inline. Not a shortcode, not a template tag. Just part of your prose.moonblox buildscans your components, compiles to JavaScript, and assemblesdist/in one command.Quick Start
Requires MoonBit toolchain.
Project Structure
Components
A component is a directory under
components/<name>/:moon.pkg— declaressupported_targets = "js+native"<name>.mbt— exportspub fn <name>_cell(args) -> @rabbita.Cell<name>.css— optional, component stylesSee the built-in components for examples.
Dependencies
License
Apache 2.0