Documark is a prototype document format and toolchain for writing fully styled, structured documents in plain text.
The project starts from a simple premise: Markdown is a good authoring format, but modern document workflows also need stable metadata, reusable layout, and reliable output for the web and print. Documark explores how far that can be pushed without falling back to opaque word processor files.
Current priorities:
- define the format in public, even while it is still a prototype
- keep documents human-readable and easy to edit by hand
- support styled HTML and printable PDF output
- separate document content from reusable layout where practical
Documark is in the prototype stage.
That has two consequences:
- the format is still being shaped and the spec may intentionally stay ahead of, or diverge from, the current implementation
- the current Ruby implementation is a reference prototype, not the final definition of the format
The current implementation can:
- parse Documark document files with a Documark header and named blocks
- read a
datablock for document metadata - read either an inline
layoutblock or a default layout template - render Markdown content to HTML
- render PDF by printing generated HTML through a headless browser
- write raw Markdown-style body output for
markdownandtexttargets
Current output targets:
htmlpdfmarkdowntext
epub is reserved in the CLI but not implemented.
This prototype is implemented in Ruby.
bundle installFor PDF output you also need a Chromium-compatible browser available on disk. The current default is:
/usr/bin/google-chrome
If your browser lives elsewhere, pass --browser or set it in config.
bundle exec bin/documark process \
--input doc/examples/simple.dm \
--output /tmp/documark-example.html \
--target htmlbundle exec bin/documark process \
--input doc/examples/simple-with-layout.dm \
--output /tmp/documark-example.pdf \
--target pdfThe executable is bin/documark.
Actions:
processconfig_newtemplate_new
Common options for process:
--input/-i--output/-o--target/-t--browser/-b--config/-c--verbose/-v--debug/-d
Example:
bundle exec bin/documark process -i input.dm -o output.html -t html!! documark document
!! data
title: "A Simple Documark Document"
language: en
!! end
# Hello
This is a Documark document.
See doc/examples/simple.dm and doc/examples/simple-with-layout.dm for working examples.
The project is trying to answer a format question, not just ship a converter.
Key themes:
- a document format should be inspectable without special software
- layout should be explicit rather than hidden in binary application state
- print output matters and should not be treated as a second-class export path
- the specification should be written early, even if it changes during the prototype phase
The longer-term goal is to help define an open, text-based standard for richly formatted documents.