Markdown template can render a markdown template by interpreting templating brackets {{
and }}
.
It can be used to render custom markdown which include data gathered by metrics. Unlike SVG templates, it is possible to include revelant hyperlinks since it'll be rendered as regular markdown.
You can even mix it with SVG plugins for even more customization using embed
function.
See example.md for a markdown template example.
Note that available data still depends on which plugins have been enabled. You may need to handle errors and setup plugins correctly in order to access to their output data.
To find which data can be used, you can run a workflow with config_output: json
.
For convenience, several useful properties are aliased in /source/templates/markdown/template.mjs.
➡️ Supported formats and inputs
# Markdown output
- uses: lowlighter/metrics@latest
with:
# ... other options
template: markdown
filename: README.md # Output file
markdown: TEMPLATE.md # Template file
markdown_cache: .cache # Cache folder
# PDF output
- uses: lowlighter/metrics@latest
with:
# ... other options
template: markdown
filename: render.pdf # Output file
markdown: TEMPLATE.md # Template file
markdown_cache: .cache # Cache folder
config_output: markdown-pdf # Output as pdf file