This project's README.md
and stdout codeblocks are created using
markatzea:
markatzea README.mz > README.md
Markatzea does not break your existing markdown. It adds a little syntax for defining the interpreter for that code block. This is defined after the code-block's language name. The code-block is then passed as stdin into the interpreter configured for that code-block.
pod2text markatzea
NAME
markatzea - evaluate your markdown code blocks
SYNOPSIS
markatzea <file>
DESCRIPTION
markatzea is a tool which takes markdown, evaluates code blocks with
interpreters and prints the output of those processes to a different
codeblock.
When no interpreter is defined, markatzea will print the markdown as is.
```bash
echo 'Does not evaluate this bash code-block'
```
echo 'Does not evaluate this bash code-block'
```bash bash
echo 'Does evaluate this bash code-block with bash'
```
echo 'Does evaluate this bash code-block with bash'
Does evaluate this bash code-block with bash
You can define the language to use for the output code block.
```bash|javascript bash
echo 'const value = 42;'
```
echo 'const value = 42;'
const value = 42;
You can achieve a form of a literate programming using a template language that offers a command line interface. See memplate for more information.
An example:
set -eo pipefail
Now we use the aliased template in another template.
<sane-bash-defaults
ls not-a-file |
cat - ||
echo 'Good! The ls process caused the pipe to stop.'
Good! The ls process caused the pipe to stop.
A list of projects that use markatzea.
- https://github.com/bas080/markatzea
- https://github.com/bas080/patroon
- https://github.com/bas080/furver
- https://github.com/bas080/package.sh
Notice that it makes it easier to maintain and test documentation by making usage examples runnable and thereby testable.