Simple Example
Definition of terms
Section titled “Definition of terms”- configuration file — A YAML file that configures markmeld and specifies targets (default:
_markmeld.yaml) - target — A specific recipe that usually builds an output
- data — Content in markdown or YAML format used to produce a target
- template — A jinja2 file defining how input is integrated to produce output
A simple example
Section titled “A simple example”Here’s a _markmeld.yaml that produces a single target:
targets: target1: output_file: "{today}_demo_output.pdf" latex_template: pandoc_default.tex jinja_template: jinja_template.jinja command: | pandoc --template "{latex_template}" --output "{output_file}" data: yaml_files: - some_data.yaml md_files: some_text_data: some_text.mdThis target reads structured data from some_data.yaml and prose from some_text.md, integrated through jinja_template.jinja. The output is piped to pandoc to produce the PDF.
Build it with: mm target1
Command line usage
Section titled “Command line usage”mm— List available targetsmm -c <config>— Use a different config filemm -l— List targets with descriptionsmm <target>— Build the targetmm <target> -p— Print output (what would be piped to the command)mm <target> -d— Dump structured input before melding (useful for debugging templates)mm <target> -e— Explain the target configuration