markcool
v1.0.4
Published
A lightweight markup language to html compiler
Readme
Markcool (MarkC) 🚀
Markcool is a revolutionary, lightweight, and highly expressive markup language designed to redefine how humans and AI Agents interact with document formatting. It completely abandons verbose CSS and HTML tags, replacing them with purely visual, "symbolic arrows" for layout, while natively supporting responsive columns, SVG mini-charts, and cross-document routing.
Read this in other languages: English | 中文
English Documentation
🌟 Key Features
- Zero-Memory Layout Symbols: Use intuitive arrows (
<-,><,<~,<>) instead of CSS classes to align, float, and center text, images, or blocks. - Native Mini-Charts (Zero Dependencies): Transform basic tables into responsive SVG charts (Bar, Line, Pie) purely in the backend, even inline within paragraphs!
- AI-First Design (Skill Included): Comes with an NPM-installable AI Skill that injects Markcool syntax and rich formatting guidelines into Large Language Models (LLMs).
- Advanced Containers: Use
###and---to build multi-column layouts, responsive grid systems, and data tables. - Cross-Document Entity Routing: Use
[[[ Anchor ]]]to seamlessly link to auto-generated document anchors.
📦 Installation
npm install -g markcool🚀 Usage (CLI)
Compile a .mc file to an HTML file:
markc input.mc -o output.htmlOr use it in Node.js:
const { parseMarkc } = require('markcool');
const html = parseMarkc('### chart-pie >< \n||| A ||| 10 |||\n###');🤖 Installing the AI Skill
Give your AI Agent (like Claude, GPT, or Antigravity) the superpower to write and compile beautiful Markcool documents:
npx markcool-skillThis automatically installs the .agents/skills/markcool directory containing the SKILL.md system prompt and compile scripts.
📚 Official Documentation & Examples
We have compiled the official specification and several rich examples into HTML. You can open them in your browser:
- 📖 Markcool Official Specification
- 📊 01. Academic Paper Layout
- 💻 02. API Documentation
- 📈 03. Financial Dashboard
- 📰 04. Portal Homepage Layout
- 📉 05. Mini-Charts Showcase
中文文档
🌟 核心特性
- 视觉象形排版体系:抛弃繁琐的 CSS 样式代码,直接用“物理箭头”(如
<-、><、<~、<>)指示元素的对齐、居中、浮动环绕与拉满。 - 零依赖原生微缩图表:无需引入庞大的前端图表库,直接利用表格语法加前缀,在服务端即时渲染高清自适应 SVG 图表(柱状图、折线图、饼图),甚至支持行内穿插图表!
- 为大模型打造 (内置 AI Skill):支持一键分发与注入 AI 技能模板,强约束大模型跳出“枯燥文本”的局限,输出拥有多级分栏、高管看板视效的惊艳文档。
- 高级分栏容器:只需一个
###加上---分割线,即可极速搭建带比例控制的多级页面结构。 - 全域实体路由:使用
[[[ ]]]无缝链接自动生成的标题、图表锚点,构建立体阅读体验。
📦 安装
npm install -g markcool🚀 CLI 使用方法
将 .mc 源码编译为独立的高清网页:
markc input.mc -o output.html🤖 给大模型安装 AI Skill
赋予你的 AI 编程助手(或本地 Agent 等工具)直接编写并编译 Markcool 富文档的超能力:
npx markcool-skill只需一行命令,即可在当前项目自动部署 .agents/skills/markcool/ 目录。内含系统级 Prompt 风格约束、纯文本语法参考,以及一键编译的 compile.sh 脚本。这使得大模型能自动遵循高级排版规范,实现从输出代码到预览网页的完美闭环。
📚 官方规范与演示样例
我们提供了详尽的纯文本语法规范,并将其与典型应用场景一起编译为了 HTML 网页。欢迎克隆本项目后在浏览器中直接打开预览其惊艳的排版效果:
