iamgio / quarkdown
iamgio / quarkdown
‼️ Quarkdown is on Product Hunt today ‼️ Your upvote shows your support and helps Quarkdown reach more people 💚 ‼️ Quarkdown 今天在 Product Hunt 上线了 ‼️ 您的点赞是对我们最大的支持,也能帮助 Quarkdown 被更多人看到 💚
About
关于
Quarkdown is a modern Markdown-based typesetting system designed for versatility. It allows a single project to compile seamlessly into a print-ready book, academic paper, knowledge base, or interactive presentation. All through an incredibly powerful Turing-complete extension of Markdown, ensuring your ideas flow automatically into paper. Quarkdown 是一个基于 Markdown 的现代排版系统,专为多功能性而设计。它允许单个项目无缝编译为可打印的书籍、学术论文、知识库或交互式演示文稿。这一切都通过一种极其强大的图灵完备 Markdown 扩展来实现,确保您的想法能够自动转化为纸面内容。
Born as an extension of CommonMark and GFM, the Quarkdown Flavor brings functions to Markdown, along with many other syntax extensions. 作为 CommonMark 和 GFM 的扩展,Quarkdown 风格为 Markdown 引入了函数功能以及许多其他语法扩展。
Possibilities are unlimited thanks to an ever-expanding standard library, which offers layout builders, I/O, math, conditional statements and loops. Not enough? You can still define your own functions and variables, all within Markdown. You can even create awesome libraries for everyone to use. 得益于不断扩展的标准库,其可能性是无限的。标准库提供了布局构建器、I/O、数学运算、条件语句和循环。还不够?您仍然可以在 Markdown 中定义自己的函数和变量。您甚至可以创建出色的库供所有人使用。
This out-of-the-box scripting support opens doors to complex and dynamic content that would be otherwise impossible to achieve with vanilla Markdown. Combined with live preview, ⚡ fast compilation speed and a powerful VS Code extension, Quarkdown simply gets the work done, whether it’s an academic paper, book, knowledge base or interactive presentation. 这种开箱即用的脚本支持为复杂和动态内容打开了大门,而这些内容在原生 Markdown 中是无法实现的。结合实时预览、⚡ 快速编译速度和强大的 VS Code 扩展,Quarkdown 可以轻松完成工作,无论是学术论文、书籍、知识库还是交互式演示文稿。
Targets
目标输出
- HTML: Plain continuous flow like Notion/Obsidian, perfect for static websites and knowledge management.
- HTML: 类似 Notion/Obsidian 的纯连续流,非常适合静态网站和知识管理。
- Paged (via paged.js): Perfect for papers, articles and books.
- 分页 (通过 paged.js): 非常适合论文、文章和书籍。
- Slides (via reveal.js): Perfect for interactive presentations.
- 幻灯片 (通过 reveal.js): 非常适合交互式演示文稿。
- Docs: Perfect for wikis, technical documentation and large knowledge bases.
- 文档: 非常适合维基、技术文档和大型知识库。
- PDF: All document types and features supported by HTML are also supported when exporting to PDF.
- PDF: HTML 支持的所有文档类型和功能在导出为 PDF 时同样适用。
Getting started
入门指南
Installation
安装
- Install script (Linux/macOS):
curl -fsSL https://raw.githubusercontent.com/quarkdown-labs/get-quarkdown/refs/heads/main/install.sh | sudo env "PATH=$PATH" bash - 安装脚本 (Linux/macOS):
curl -fsSL https://raw.githubusercontent.com/quarkdown-labs/get-quarkdown/refs/heads/main/install.sh | sudo env "PATH=$PATH" bash - Homebrew (Linux/macOS):
brew install quarkdown-labs/quarkdown/quarkdown - Homebrew (Linux/macOS):
brew install quarkdown-labs/quarkdown/quarkdown - Install script (Windows):
irm https://raw.githubusercontent.com/quarkdown-labs/get-quarkdown/refs/heads/main/install.ps1 | iex - 安装脚本 (Windows):
irm https://raw.githubusercontent.com/quarkdown-labs/get-quarkdown/refs/heads/main/install.ps1 | iex
Creating a project
创建项目
quarkdown create [directory] will launch the prompt-based project wizard, making it quicker than ever to set up a new Quarkdown project, with all metadata and initial content already present.
quarkdown create [directory] 将启动基于提示的项目向导,使设置新的 Quarkdown 项目比以往任何时候都更快,所有元数据和初始内容都已准备就绪。
Compiling
编译
Running quarkdown c file.qd will compile the given file and save the output to file. If the project is composed by multiple source files, the target file must be the root one, i.e. the one that includes the other files.
运行 quarkdown c file.qd 将编译指定文件并将输出保存到文件。如果项目由多个源文件组成,目标文件必须是根文件,即包含其他文件的那个文件。
Options
选项
-por--preview: enables automatic content reloading after compiling.-p或--preview: 启用编译后的自动内容重载。-wor--watch: recompiles the source every time a file is saved.-w或--watch: 每次保存文件时重新编译源文件。