doc(plugins/posts): update

This commit is contained in:
lowlighter
2022-01-15 21:20:02 -05:00
parent 9153554c8e
commit 1b646abb3f
2 changed files with 49 additions and 37 deletions

View File

@@ -1,20 +1,29 @@
### ✒️ Recent posts
The recent *posts* plugin displays recent articles you wrote on an external source, like [dev.to](https://dev.to).
<!--header-->
<table>
<td align="center">
<details open><summary>Latest posts</summary>
<img src="https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.posts.svg">
</details>
<details><summary>Latest posts width description and cover image</summary>
<img src="https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.posts.full.svg">
</details>
<tr><th colspan="2"><h3>✒️ Recent posts</h3></th></tr>
<tr><td colspan="2" align="center"><p>This plugin displays recent articles from a specified external source.</p>
</td></tr>
<tr>
<th rowspan="3">Supported features<br><sub><a href="metadata.yml">→ Full specification</a></sub></th>
<td><a href="/source/templates/classic"><code>📗 Classic template</code></a> <a href="/source/templates/markdown"><code>📒 Markdown template</code></a> <a href="/source/templates/repository"><code>📘 Repository template</code></a></td>
</tr>
<tr>
<td><code>👤 Users</code> <code>👥 Organizations</code> <code>📓 Repositories</code></td>
</tr>
<tr>
<td><i>No tokens are required for this plugin</i></td>
</tr>
<tr>
<td colspan="2" align="center">
<details open><summary>Latest posts</summary><img src="https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.posts.svg" alt=""></img></details>
<details><summary>Latest posts width description and cover image</summary><img src="https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.posts.full.svg" alt=""></img></details>
<img width="900" height="1" alt="">
</td>
</tr>
</table>
<!--/header-->
#### ➡️ Available options
## ➡️ Available options
<!--options-->
<table>
@@ -23,7 +32,7 @@ The recent *posts* plugin displays recent articles you wrote on an external sour
</tr>
<tr>
<td nowrap="nowrap"><code>plugin_posts</code></td>
<td rowspan="2"><p>Display recent posts</p>
<td rowspan="2"><p>Enable posts plugin</p>
<img width="900" height="1" alt=""></td>
</tr>
<tr>
@@ -33,7 +42,11 @@ The recent *posts* plugin displays recent articles you wrote on an external sour
</tr>
<tr>
<td nowrap="nowrap"><code>plugin_posts_source</code></td>
<td rowspan="2"><p>Posts external source</p>
<td rowspan="2"><p>External source</p>
<ul>
<li><code>dev.to</code>: <a href="https://dev.to">dev.to</a></li>
<li><code>hashnode</code>: <a href="https://hashnode.com">hashnode.com</a></li>
</ul>
<img width="900" height="1" alt=""></td>
</tr>
<tr>
@@ -43,7 +56,7 @@ The recent *posts* plugin displays recent articles you wrote on an external sour
</tr>
<tr>
<td nowrap="nowrap"><code>plugin_posts_descriptions</code></td>
<td rowspan="2"><p>Display posts descriptions</p>
<td rowspan="2"><p>Toggle posts descriptions display</p>
<img width="900" height="1" alt=""></td>
</tr>
<tr>
@@ -53,7 +66,7 @@ The recent *posts* plugin displays recent articles you wrote on an external sour
</tr>
<tr>
<td nowrap="nowrap"><code>plugin_posts_covers</code></td>
<td rowspan="2"><p>Display posts cover images</p>
<td rowspan="2"><p>Toggle posts cover images display</p>
<img width="900" height="1" alt=""></td>
</tr>
<tr>
@@ -63,7 +76,7 @@ The recent *posts* plugin displays recent articles you wrote on an external sour
</tr>
<tr>
<td nowrap="nowrap"><code>plugin_posts_limit</code></td>
<td rowspan="2"><p>Maximum number of posts to display</p>
<td rowspan="2"><p>Display limit</p>
<img width="900" height="1" alt=""></td>
</tr>
<tr>
@@ -76,7 +89,7 @@ The recent *posts* plugin displays recent articles you wrote on an external sour
</tr>
<tr>
<td nowrap="nowrap"><code>plugin_posts_user</code></td>
<td rowspan="2"><p>Posts external source username</p>
<td rowspan="2"><p>External source username</p>
<img width="900" height="1" alt=""></td>
</tr>
<tr>
@@ -87,9 +100,7 @@ The recent *posts* plugin displays recent articles you wrote on an external sour
</table>
<!--/options-->
*[→ Full specification](metadata.yml)*
#### Examples workflows
## Examples workflows
<!--examples-->
```yaml

View File

@@ -1,5 +1,9 @@
name: "✒️ Recent posts"
category: social
description: This plugin displays recent articles from a specified external source.
examples:
+latest posts: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.posts.svg
Latest posts width description and cover image: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.posts.full.svg
index: 6
supports:
- user
@@ -8,44 +12,41 @@ supports:
scopes: []
inputs:
# Enable or disable plugin
plugin_posts:
description: Display recent posts
description: Enable posts plugin
type: boolean
default: no
# Posts external source
plugin_posts_source:
description: Posts external source
description: |
External source
- `dev.to`: [dev.to](https://dev.to)
- `hashnode`: [hashnode.com](https://hashnode.com)
type: string
default: ""
values:
- dev.to # Dev.to
- dev.to
- hashnode
# Display a few lines about each posts
plugin_posts_descriptions:
description: Display posts descriptions
description: Toggle posts descriptions display
type: boolean
default: no
# Display posts cover images
plugin_posts_covers:
description: Display posts cover images
description: Toggle posts cover images display
type: boolean
default: no
# Number of posts to display
plugin_posts_limit:
description: Maximum number of posts to display
description: Display limit
type: number
default: 4
min: 1
max: 30
# Username on external posts source
plugin_posts_user:
description: Posts external source username
description: External source username
type: string
default: .user.login