docs: minor changes

This commit is contained in:
lowlighter
2022-01-15 23:34:09 -05:00
parent 20ab1e9780
commit c82a49ea63
9 changed files with 14 additions and 10 deletions

View File

@@ -5,12 +5,12 @@ Plugins provide additional content and lets you customize rendered metrics.
**📦 Maintained by core team** **📦 Maintained by core team**
<% { let previous = null; for (const [plugin, {name, category, authors = []}] of Object.entries(plugins).filter(([key, value]) => (value)&&(value.category !== "community")).sort(([an, a], [bn, b]) => a.category === b.category ? an.localeCompare(bn) : 0)) { %> <% { let previous = null; for (const [plugin, {name, category, authors = []}] of Object.entries(plugins).filter(([key, value]) => (value)&&(value.category !== "community")).sort(([an, a], [bn, b]) => a.category === b.category ? an.localeCompare(bn) : 0)) { %>
<% if (previous !== category) { previous = category -%> <% if (previous !== category) { previous = category -%>
* **<%= `${category.charAt(0).toLocaleUpperCase()}${category.substring(1)}` %>** * **<%= `${category.charAt(0).toLocaleUpperCase()}${category.substring(1)} plugins` %>**
<% } -%> <% } -%>
* [<%- name %>](/source/plugins/<%= plugin %>/README.md)<%# -%> * [<%- name %> <sub>`<%= plugin %>`</sub>](/source/plugins/<%= plugin %>/README.md)<%# -%>
<% }} %> <% }} %>
**🎲 Maintained by community** **🎲 Maintained by community**
<% { let previous = null; for (const [plugin, {name, category, authors = []}] of Object.entries(plugins).filter(([key, value]) => (value)&&(value.category === "community")).sort(([an, a], [bn, b]) => a.category === b.category ? an.localeCompare(bn) : 0)) { %><%# -%> <% { let previous = null; for (const [plugin, {name, category, authors = []}] of Object.entries(plugins).filter(([key, value]) => (value)&&(value.category === "community")).sort(([an, a], [bn, b]) => a.category === b.category ? an.localeCompare(bn) : 0)) { %><%# -%>
* [<%- name %>](/source/plugins/<%= plugin %>/README.md) by <%- authors.map(author => `[@${author}](https://github.com/${author})`).join(" ") %> * [<%- name %> <sub>`<%= plugin %>`</sub>](/source/plugins/<%= plugin %>/README.md) by <%- authors.map(author => `[@${author}](https://github.com/${author})`).join(" ") %>
<% }} %> <% }} %>

View File

@@ -3,5 +3,5 @@
Templates lets you change general appearance of rendered metrics. Templates lets you change general appearance of rendered metrics.
<% for (const [template, {name}] of Object.entries(templates).filter(([key, value]) => value)) { %> <% for (const [template, {name}] of Object.entries(templates).filter(([key, value]) => value)) { %>
* [<%- name %>](/source/templates/<%= template %>/README.md)<%# -%> * [<%- name %> <sub>`<%= template %>`</sub>](/source/templates/<%= template %>/README.md)<%# -%>
<% } %> <% } %>

View File

@@ -831,6 +831,7 @@ jobs:
plugin_tweets_token: ${{ secrets.TWITTER_TOKEN }} plugin_tweets_token: ${{ secrets.TWITTER_TOKEN }}
plugin_tweets_attachments: 'yes' plugin_tweets_attachments: 'yes'
plugin_tweets_user: github plugin_tweets_user: github
plugin_tweets_limit: 1
plugins_errors_fatal: 'yes' plugins_errors_fatal: 'yes'
output_action: none output_action: none
delay: 120 delay: 120
@@ -855,6 +856,7 @@ jobs:
base: '' base: ''
plugin_posts: 'yes' plugin_posts: 'yes'
plugin_posts_source: dev.to plugin_posts_source: dev.to
plugin_posts_limit: 2
plugin_posts_descriptions: 'yes' plugin_posts_descriptions: 'yes'
plugin_posts_covers: 'yes' plugin_posts_covers: 'yes'
plugins_errors_fatal: 'yes' plugins_errors_fatal: 'yes'

View File

@@ -210,7 +210,7 @@ metadata.plugin = async function({__plugins, __templates, name, logger}) {
key, key,
{ {
comment:comments[key] ?? `# ${value.description}`, comment:comments[key] ?? `# ${value.description}`,
descriptor:yaml.dump({[key]:Object.fromEntries(Object.entries(value).filter(([key]) => ["description", "default", "required"].includes(key)).map(([k, v]) => k === "description" ? [k, v.split("\n").at(0)] : [k, v]))}, {quotingType:'"', noCompatMode:true}), descriptor:yaml.dump({[key]:Object.fromEntries(Object.entries(value).filter(([key]) => ["description", "default", "required"].includes(key)).map(([k, v]) => k === "description" ? [k, v.split("\n")[0]] : [k, v]))}, {quotingType:'"', noCompatMode:true}),
}, },
]), ]),
) )

View File

@@ -15,5 +15,6 @@
base: "" base: ""
plugin_posts: yes plugin_posts: yes
plugin_posts_source: dev.to plugin_posts_source: dev.to
plugin_posts_limit: 2
plugin_posts_descriptions: yes plugin_posts_descriptions: yes
plugin_posts_covers: yes plugin_posts_covers: yes

View File

@@ -2,8 +2,8 @@ name: "✒️ Recent posts"
category: social category: social
description: This plugin displays recent articles from a specified external source. description: This plugin displays recent articles from a specified external source.
examples: examples:
+latest posts: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.posts.svg 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 +latest posts width description and cover image: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.posts.full.svg
index: 6 index: 6
supports: supports:
- user - user

View File

@@ -3,7 +3,7 @@ category: github
description: This plugin displays sponsors and introduction text from [GitHub sponsors](https://github.com/sponsors/). description: This plugin displays sponsors and introduction text from [GitHub sponsors](https://github.com/sponsors/).
examples: examples:
+GitHub sponsors card: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.sponsors.svg +GitHub sponsors card: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.sponsors.svg
+GitHub sponsors full introduction: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.sponsors.full.svg GitHub sponsors full introduction: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.sponsors.full.svg
index: 23 index: 23
supports: supports:
- user - user

View File

@@ -18,3 +18,4 @@
plugin_tweets_token: ${{ secrets.TWITTER_TOKEN }} plugin_tweets_token: ${{ secrets.TWITTER_TOKEN }}
plugin_tweets_attachments: yes plugin_tweets_attachments: yes
plugin_tweets_user: github plugin_tweets_user: github
plugin_tweets_limit: 1

View File

@@ -2,8 +2,8 @@ name: "🐤 Latest tweets"
category: social category: social
description: This plugin displays the latest tweets from your [Twitter](https://twitter.com) account. description: This plugin displays the latest tweets from your [Twitter](https://twitter.com) account.
examples: examples:
+latest tweets: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.tweets.svg +latest tweets with attachments: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.tweets.attachments.svg
latest tweets with attachments: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.tweets.attachments.svg latest tweets: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.tweets.svg
index: 5 index: 5
supports: supports:
- user - user