markit:仓颉 Markdown 解析、文档站生成、PDF/Typst 输出等全链路工具链

仓颉 Markdown 解析、文档站生成、PDF/Typst 输出等全链路工具链

Branch5Tags0

Markit

License Language Platforms

Markit is a Cangjie toolkit for parsing, rendering, and publishing Markdown. It combines a session-based Markdown engine with a production CLI for websites, PDF, Typst, and local live preview workflows.

Markit CLI

Features

  • CommonMark, GFM, i18n, tables, footnotes, references, and TOC support
  • Website, Markdown, Typst, and PDF output
  • Build-time Cangjie/TextMate code highlighting, TeX math, and Mermaid SVG rendering
  • serve command with live-server, file watching, and hot reload
  • Batch rendering, configurable navigation, themes, search indexes, and static assets
  • Append-only parsing sessions for streamed Markdown and editable document sessions for live previews

Project Structure

Package Purpose
markit Markdown parsing and rendering engine
markit-cli End-user renderer, preview server, and build tool
markit-kit Shared CLI/runtime utilities and bundled assets
codehl Build-time TextMate grammar code highlighting
mathtex TeX math to HTML, MathML, and Typst
mermaid4cj Build-time Mermaid diagram renderer
commandline Declarative Cangjie CLI framework
fswatch Cross-platform file-system watching
live-server Local static HTTP server used by markit-cli serve
dochir Cangjie API documentation generator
vscode-extension VS Code Markdown preview using a persistent worker, with per-project language switching

Quick Start

Install a Cangjie SDK (1.1.0 or newer), then build the CLI from the repository root:

cd markit-cli
cjpm build

The executable and its runtime assets are produced under markit-cli/target/release/bin/:

./target/release/bin/main --help
./target/release/bin/main render -i ../docs -o ../target/site
./target/release/bin/main serve -i ../docs

See markit-cli/README.md and markit-cli/documentation.md for commands and configuration.

Prebuilt Binaries

Tagged releases publish archives for Linux x64, macOS x64, macOS arm64, and Windows x64. Each archive contains the markit executable and the required assets directory. Download them from the Releases page.

The same release includes markit-preview-0.1.0.vsix. In VS Code, run Extensions: Install from VSIX..., select the file, and set markit.executablePath to the downloaded CLI. See the extension guide for preview controls.

Documentation

License

Markit is released under the Apache License 2.0.

Introduction

仓颉 Markdown 解析、文档站生成、PDF/Typst 输出等全链路工具链

https://markit.cangjie.designCustomize your domain