Update documentation
This commit is contained in:
@@ -25,12 +25,25 @@ For convenience, several useful properties are aliased in [/source/templates/mar
|
||||
#### ℹ️ Examples workflows
|
||||
|
||||
```yaml
|
||||
# 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
|
||||
config_output: markdown # Output as markdown file
|
||||
filename: README.md # Output file
|
||||
markdown: TEMPLATE.md # Template file
|
||||
markdown_cache: .cache # Cache folder
|
||||
config_output: markdown # Output as markdown file
|
||||
```
|
||||
|
||||
```yaml
|
||||
# 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
|
||||
```
|
||||
|
||||
@@ -50,7 +50,7 @@ ___
|
||||
|
||||
To include SVGs metrics images without creating additional jobs, use the `embed` function:
|
||||
|
||||
<%- await embed("example-isocalendar", {isocalendar:true, isocalendar_duration:"full-year"}) %>
|
||||
<%- await embed(`example-isocalendar`, {isocalendar:true, isocalendar_duration:"full-year"}) %>
|
||||
|
||||
It takes two arguments:
|
||||
- An unique identifier which will be used as filename withing `markdown_cache` folder
|
||||
|
||||
13
source/templates/markdown/example.pdf.md
Normal file
13
source/templates/markdown/example.pdf.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# 📒 Markdown template example (pdf)
|
||||
|
||||
When using **markdown template**, it is possible to export output as PDF.
|
||||
|
||||
See [rendering of this file here](https://github.com/lowlighter/lowlighter/blob/master/metrics.markdown.pdf.md) and [original template source here](https://github.com/lowlighter/metrics/blob/master/source/templates/markdown/example.pdf.md).
|
||||
|
||||
## 🧩 Plugins
|
||||
|
||||
You can customize your template with both markdown plugins and SVG plugins like below:
|
||||
|
||||
<%- await include(`partials/rss.ejs`) %>
|
||||
|
||||
<%- await embed(`test-isocalendar`, {isocalendar:true}) %>
|
||||
Reference in New Issue
Block a user