docs(plugins/core): add missing documentation about optimize [skip ci]

This commit is contained in:
lowlighter
2022-01-02 05:38:13 -05:00
parent 7f31d7a7d1
commit b85f2f3178

View File

@@ -203,7 +203,7 @@ It is possible to configure output behaviour using `output_action` option, which
- `gist`, where output will be stored an already existing gist - `gist`, where output will be stored an already existing gist
- To use this feature, a `gists` scope must be granted to your `token` and `committer_gist` identifier must be provided - To use this feature, a `gists` scope must be granted to your `token` and `committer_gist` identifier must be provided
It also possible to alter output condition using `output_action` option, which can be set to: It also possible to alter output condition using `output_condition` option, which can be set to:
- `always`, to always push changes (provided that git sha changed) - `always`, to always push changes (provided that git sha changed)
- `data-changed`, to skip changes if no actual data changed (e.g. when only render timestamp changed) - `data-changed`, to skip changes if no actual data changed (e.g. when only render timestamp changed)
@@ -265,6 +265,8 @@ It could then be processed for other usages.
It is possible to convert output to PDF when using a markdown template by setting `config_output` to `markdown-pdf`. It is possible to convert output to PDF when using a markdown template by setting `config_output` to `markdown-pdf`.
It is advised to keep `config_base64: yes` to encode embed images in base64 and make self-contained documents.
#### Examples workflows #### Examples workflows
```yaml ```yaml
@@ -274,6 +276,31 @@ It is possible to convert output to PDF when using a markdown template by settin
markdown: template.md markdown: template.md
markdown_cache: .cache markdown_cache: .cache
config_output: markdown-pdf config_output: markdown-pdf
config_base64: yes
```
### 🗜️ Optimize SVG output
It is possible to optimize SVG output and reducing its filesize to improve loading times and reduce storage.
The following optimizations are supported:
- `css`, which purge unused CSS and minify remaining styles
- `xml`, which pretty-print XML (it also helps reducing diffs between commits)
- `svg`, which optimize SVG with SVGO (experimental)
#### Examples workflows
```yaml
- uses: lowlighter/metrics@latest
with:
# ... other options
optimize: css, xml
- uses: lowlighter/metrics@latest
with:
# ... other options
optimize: css, xml, svg
experimental_features: --optimize-svg
``` ```
### ✨ Render `Metrics insights` statically ### ✨ Render `Metrics insights` statically