From c82a49ea631c0a7a064a9e1a562816be5913c215 Mon Sep 17 00:00:00 2001 From: lowlighter <22963968+lowlighter@users.noreply.github.com> Date: Sat, 15 Jan 2022 23:34:09 -0500 Subject: [PATCH] docs: minor changes --- .github/readme/partials/documentation/plugins.md | 6 +++--- .github/readme/partials/documentation/templates.md | 2 +- .github/workflows/examples.yml | 2 ++ source/app/metrics/metadata.mjs | 2 +- source/plugins/posts/examples.yml | 1 + source/plugins/posts/metadata.yml | 4 ++-- source/plugins/sponsors/metadata.yml | 2 +- source/plugins/tweets/examples.yml | 1 + source/plugins/tweets/metadata.yml | 4 ++-- 9 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/readme/partials/documentation/plugins.md b/.github/readme/partials/documentation/plugins.md index 5d2d932a..2850bbeb 100644 --- a/.github/readme/partials/documentation/plugins.md +++ b/.github/readme/partials/documentation/plugins.md @@ -5,12 +5,12 @@ Plugins provide additional content and lets you customize rendered metrics. **📦 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)) { %> <% 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 %> `<%= plugin %>`](/source/plugins/<%= plugin %>/README.md)<%# -%> <% }} %> **🎲 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)) { %><%# -%> -* [<%- name %>](/source/plugins/<%= plugin %>/README.md) by <%- authors.map(author => `[@${author}](https://github.com/${author})`).join(" ") %> +* [<%- name %> `<%= plugin %>`](/source/plugins/<%= plugin %>/README.md) by <%- authors.map(author => `[@${author}](https://github.com/${author})`).join(" ") %> <% }} %> \ No newline at end of file diff --git a/.github/readme/partials/documentation/templates.md b/.github/readme/partials/documentation/templates.md index 981517b1..abff500c 100644 --- a/.github/readme/partials/documentation/templates.md +++ b/.github/readme/partials/documentation/templates.md @@ -3,5 +3,5 @@ Templates lets you change general appearance of rendered metrics. <% for (const [template, {name}] of Object.entries(templates).filter(([key, value]) => value)) { %> -* [<%- name %>](/source/templates/<%= template %>/README.md)<%# -%> +* [<%- name %> `<%= template %>`](/source/templates/<%= template %>/README.md)<%# -%> <% } %> diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index c62bb664..58ff5a61 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -831,6 +831,7 @@ jobs: plugin_tweets_token: ${{ secrets.TWITTER_TOKEN }} plugin_tweets_attachments: 'yes' plugin_tweets_user: github + plugin_tweets_limit: 1 plugins_errors_fatal: 'yes' output_action: none delay: 120 @@ -855,6 +856,7 @@ jobs: base: '' plugin_posts: 'yes' plugin_posts_source: dev.to + plugin_posts_limit: 2 plugin_posts_descriptions: 'yes' plugin_posts_covers: 'yes' plugins_errors_fatal: 'yes' diff --git a/source/app/metrics/metadata.mjs b/source/app/metrics/metadata.mjs index dabf9f0e..0b4fb8cc 100644 --- a/source/app/metrics/metadata.mjs +++ b/source/app/metrics/metadata.mjs @@ -210,7 +210,7 @@ metadata.plugin = async function({__plugins, __templates, name, logger}) { key, { 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}), }, ]), ) diff --git a/source/plugins/posts/examples.yml b/source/plugins/posts/examples.yml index b7496115..f952b4f8 100644 --- a/source/plugins/posts/examples.yml +++ b/source/plugins/posts/examples.yml @@ -15,5 +15,6 @@ base: "" plugin_posts: yes plugin_posts_source: dev.to + plugin_posts_limit: 2 plugin_posts_descriptions: yes plugin_posts_covers: yes diff --git a/source/plugins/posts/metadata.yml b/source/plugins/posts/metadata.yml index 116b983c..24397d41 100644 --- a/source/plugins/posts/metadata.yml +++ b/source/plugins/posts/metadata.yml @@ -2,8 +2,8 @@ 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 + 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 diff --git a/source/plugins/sponsors/metadata.yml b/source/plugins/sponsors/metadata.yml index 32c248df..d1ec3df6 100644 --- a/source/plugins/sponsors/metadata.yml +++ b/source/plugins/sponsors/metadata.yml @@ -3,7 +3,7 @@ category: github description: This plugin displays sponsors and introduction text from [GitHub sponsors](https://github.com/sponsors/). examples: +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 supports: - user diff --git a/source/plugins/tweets/examples.yml b/source/plugins/tweets/examples.yml index e79ee953..6a0128f0 100644 --- a/source/plugins/tweets/examples.yml +++ b/source/plugins/tweets/examples.yml @@ -18,3 +18,4 @@ plugin_tweets_token: ${{ secrets.TWITTER_TOKEN }} plugin_tweets_attachments: yes plugin_tweets_user: github + plugin_tweets_limit: 1 diff --git a/source/plugins/tweets/metadata.yml b/source/plugins/tweets/metadata.yml index 987528c9..b38fd7e3 100644 --- a/source/plugins/tweets/metadata.yml +++ b/source/plugins/tweets/metadata.yml @@ -2,8 +2,8 @@ name: "🐤 Latest tweets" category: social description: This plugin displays the latest tweets from your [Twitter](https://twitter.com) account. 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 supports: - user