docs: updated workflows examples and options descriptions (#772) [skip ci]

This commit is contained in:
Simon Lecoq
2022-01-14 04:49:14 +01:00
committed by GitHub
parent 44e3992ca9
commit 4d06539136
80 changed files with 2292 additions and 450 deletions

View File

@@ -10,17 +10,39 @@ It can be restricted with a [CSS selector](https://developer.mozilla.org/en-US/d
</td>
</table>
#### ➡️ Available options
<!--options-->
| Option | Type *(format)* **[default]** *{allowed values}* | Description |
| ------ | -------------------------------- | ----------- |
| `plugin_screenshot` | `boolean` **[no]** | Display a screenshot of any website |
| `plugin_screenshot_title` | `string` **[Screenshot]** | Screenshot title caption |
| `plugin_screenshot_url` | `string` **[]** | Website to take screenshot |
| `plugin_screenshot_selector` | `string` **[body]** | Selector to take in screenshot |
| `plugin_screenshot_background` | `boolean` **[yes]** | Display or remove default page background |
Legend for option icons:
* 🔐 Value should be stored in repository secrets
* ✨ New feature currently in testing on `master`/`main`
<!--/options-->
*[→ Full specification](metadata.yml)*
#### Examples workflows
[➡️ Available options for this plugin](metadata.yml)
<!--examples-->
```yaml
- uses: lowlighter/metrics@latest
with:
# ... other options
plugin_screenshot: yes
plugin_screenshot_title: XKCD of the day # Section title
plugin_screenshot_url: https://xkcd.com # Website url
plugin_screenshot_selector: "#comic img" # CSS selector to take into screenshot
plugin_screenshot_background: no # Remove page background
```
name: XKCD of the day
uses: lowlighter/metrics@latest
with:
filename: metrics.plugin.screenshot.svg
token: ${{ secrets.METRICS_TOKEN }}
base: ''
plugin_screenshot: 'yes'
plugin_screenshot_title: XKCD of the day
plugin_screenshot_url: https://xkcd.com
plugin_screenshot_selector: '#comic img'
```
<!--/examples-->