Fix embed function in action

This commit is contained in:
lowlighter
2021-04-26 20:07:29 +02:00
parent 1f7b6b4c96
commit 07f957ef5e
3 changed files with 11 additions and 8 deletions

View File

@@ -18,8 +18,6 @@ I joined GitHub on `{{ f.date(REGISTRATION_DATE, {dateStyle:"short"}) }}`.
I contributed to `{{ REPOSITORIES_CONTRIBUTED_TO }}` repositories and made `{{ COMMITS }}` commits.
```
<%- await embed({isocalendar:true}) %>
## 🧩 Plugins
### Using markdown plugins
@@ -50,8 +48,12 @@ ___
### Embedding SVG metrics
You can also generate "on-the-fly" SVGs metrics image using the `embed` function:
To include SVGs metrics images without creating additional jobs, use the `embed` function:
<%- await embed({isocalendar:true, isocalendar_duration:"full-year"}) %>
<%- await embed("example-isocalendar", {isocalendar:true, isocalendar_duration:"full-year"}) %>
Available configuration options are mostly the same as [action.yml](https://github.com/lowlighter/metrics/blob/master/action.yml). Note that tokens options must **not** be passed to this function. These will be automatically passed down when defined in your workflow job.
It takes two arguments:
- An unique identifier which will be used as filename withing `markdown_cache` folder
- Configuration options (see [action.yml](https://github.com/lowlighter/metrics/blob/master/action.yml))
- Tokens options are automatically passed down from your workflow job, do not pass them again
- Options syntax is same as web instance (i.e. dots (`.`) instead of underscores (`_`) and no `plugin_` prefixes)