From e4ff40453a6525117b15d825d42f80b0211a51cc Mon Sep 17 00:00:00 2001 From: lowlighter <22963968+lowlighter@users.noreply.github.com> Date: Fri, 26 Nov 2021 17:52:29 -0500 Subject: [PATCH] docs: improve community plugin docs [skip ci] --- .github/readme/partials/documentation/plugins.md | 16 ++++++++++++---- .github/readme/partials/introduction.md | 4 ++-- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/readme/partials/documentation/plugins.md b/.github/readme/partials/documentation/plugins.md index e12a10a4..903b816c 100644 --- a/.github/readme/partials/documentation/plugins.md +++ b/.github/readme/partials/documentation/plugins.md @@ -1,11 +1,19 @@ ## 🧩 Plugins Plugins are features which provide additional content and lets you customize your rendered metrics. +See their respective documentation for more informations about how to setup them. -See their respective documentation for more informations about how to setup them: -<% { let previous = null; for (const [plugin, {name, category, authors = []}] of Object.entries(plugins).filter(([key, value]) => value).sort(([an, a], [bn, b]) => a.category === b.category ? an.localeCompare(bn) : 0)) { %> +The following plugins are maintained by Metric's 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)}` %>**<% if (category === "community") { %> *(provided and maintained by contributors)*<% } %> +* **<%= `${category.charAt(0).toLocaleUpperCase()}${category.substring(1)}` %>** <% } -%> - * [<%- name %>](/source/plugins/<%= plugin %>/README.md)<% if (category === "community") { %> <%- authors.map(author => `[@${author}](https://github.com/${author})`).join(" ") %><% } %><%# -%> + * [<%- name %>](/source/plugins/<%= plugin %>/README.md)<%# -%> <% }} %> + +### 🎲 Community plugins + +The following plugins are provided and maintained by Metrics's user 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) <%- authors.map(author => `[@${author}](https://github.com/${author})`).join(" ") %><%# -%> +<% }} %> \ No newline at end of file diff --git a/.github/readme/partials/introduction.md b/.github/readme/partials/introduction.md index 7cd99108..b6b2c2ac 100644 --- a/.github/readme/partials/introduction.md +++ b/.github/readme/partials/introduction.md @@ -15,7 +15,7 @@ Generate your metrics that you can embed everywhere, including your GitHub profi <% { let cell = 0 - const elements = Object.entries(plugins).filter(([key, value]) => (value)&&(!["base", "core"].includes(key)&&(!value.community))) + const elements = Object.entries(plugins).filter(([key, value]) => (value)&&(!["base", "core"].includes(key)&&(value.category !== "community"))) %> And you can customize these heavily with plugins, templates and hundreds of options! @@ -23,7 +23,7 @@ And you can customize these heavily with plugins, templates and hundreds of opti
| - 🧩 <%= elements.length %> plugins + 🧩 <%= elements.length %>+ plugins |
|---|