CompMD Author's Guide
How to write in CompMD: documents that read as Markdown and render as pages, with boxes, grids, values from data, inputs the reader changes, and components of your own, written in CompMD itself. It is for writers, not programmers: no code is needed. Building CompMD into an application is the Developer's Guide.
The playground's Learn CompMD tour is the five-minute introduction, hands on; this book is what you keep open while writing. Every example in it opens in the playground, where you can change it and watch the page.
Who it is for#
People who write: notes, newsletters, reports, documentation, anything you would write in Markdown and want to do more with. You don't need to program. The book uses a few small formulas, to compute a total or choose a color, and explains each one where it first appears. It covers the syntax, data, inputs, layout, components written in CompMD itself, and the packs a document uses.
Components written in code, in React, Svelte or JavaScript, are the Developer's Guide's subject. So are applications that show CompMD documents. This book says only what such a component looks like to the document that uses it.
Contents#
Part I. Writing
- A first document
- The Markdown you know
- Containers and params
- Values and expressions
- Showing and repeating
Part II. Data and inputs
Part III. Layout
Part IV. Components of your own
Part V. Packs
Appendices
The examples#
Each chapter's document is a file in examples/, which the guides' tests process and compare with the chapter's text. Every CompMD block in the book processes without a diagnostic, so what you copy works.