Skip to content

Commit 91cc3c0

Browse files
committed
docs: split community plugins from core maintained ones
1 parent 681ac3b commit 91cc3c0

File tree

7 files changed

+24
-21
lines changed

7 files changed

+24
-21
lines changed

.github/quickstart/plugin/metadata.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: "🧩 <%= `${name.charAt(0).toLocaleUpperCase()}${name.substring(1)}` %>"
2-
category: other # Set plugin category ("github", "social" or "other")
2+
category: community # Leave as it
33
supports:
4-
- user # Support users account
5-
- organization # Support organizations account
6-
- repository # Support repositories metrics
4+
- user # Support users account
5+
- organization # Support organizations account
6+
- repository # Support repositories metrics
77
inputs:
88

99
# Enable or disable plugin

.github/readme/partials/documentation/compatibility.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,27 @@
33
<table>
44
<tr>
55
<th nowrap="nowrap">Template/Plugin</th><%# -%>
6-
<% for (const [plugin, {name, icon}] of Object.entries(plugins).filter(([key, value]) => (value)&&(!["core"].includes(key)))) { %>
6+
<% for (const [plugin, {name, icon}] of Object.entries(plugins).filter(([key, value]) => (value)&&(!["core"].includes(key))&&(value.category !== "community"))) { %>
77
<th nowrap="nowrap" align="center" title="<%= name %>"><%= icon %></th><% } %>
88
</tr><%# -%>
99
<% for (const [template, {name, readme}] of Object.entries(templates).filter(([key, value]) => (value)&&(!["community"].includes(key)))) { %>
1010
<tr>
1111
<td nowrap="nowrap"><%- name %></td><%# -%>
12-
<% for (const [plugin] of Object.entries(plugins).filter(([key, value]) => (value)&&(!["core"].includes(key)))) { %>
12+
<% for (const [plugin] of Object.entries(plugins).filter(([key, value]) => (value)&&(!["core"].includes(key))&&(value.category !== "community"))) { %>
1313
<td nowrap="nowrap" align="center" data-plugin="<%= plugin %>"><%= {true:"✔️", false:"❌", embed:"✓"}[readme.compatibility[plugin]] %></td><% } %>
1414
</tr><% } %>
1515
<tr>
1616
<td colspan="<%= Object.keys(plugins).length %>"></td>
1717
</tr>
1818
<tr>
1919
<th nowrap="nowrap">Mode/Plugin</th><%# -%>
20-
<% for (const [plugin, {name, icon}] of Object.entries(plugins).filter(([key, value]) => (value)&&(!["core"].includes(key)))) { %>
20+
<% for (const [plugin, {name, icon}] of Object.entries(plugins).filter(([key, value]) => (value)&&(!["core"].includes(key))&&(value.category !== "community"))) { %>
2121
<th nowrap="nowrap" align="center" title="<%= name %>"><%= icon %></th><% } %>
2222
</tr><%# -%>
2323
<% for (const {mode, icon} of [{mode:"user", icon:"👤"}, {mode:"organization", icon:"👥"}, {mode:"repository", icon:"📓"}]) { %>
2424
<tr>
2525
<td nowrap="nowrap"><%= icon %> <%- `${mode.charAt(0).toLocaleUpperCase()}${mode.substring(1)}` %></td><%# -%>
26-
<% for (const [plugin, {supports}] of Object.entries(plugins).filter(([key, value]) => (value)&&(!["core"].includes(key)))) {%>
26+
<% for (const [plugin, {supports}] of Object.entries(plugins).filter(([key, value]) => (value)&&(!["core"].includes(key))&&(value.category !== "community"))) {%>
2727
<td nowrap="nowrap" align="center" data-plugin="<%= plugin %>"><%= supports.includes(mode) ? "✔️" : "❌" %></td><% } %>
2828
</tr><% } %>
2929
</table>
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
## 🧩 Plugins
22

33
Plugins are features which provide additional content and lets you customize your rendered metrics.
4+
45
See their respective documentation for more informations about how to setup them:
5-
<% { let previous = null; for (const [plugin, {name, category}] of Object.entries(plugins).filter(([key, value]) => value).sort(([an, a], [bn, b]) => a.category === b.category ? an.localeCompare(bn) : 0)) { %>
6+
<% { 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)) { %>
67
<% if (previous !== category) { previous = category -%>
7-
* **<%= `${category.charAt(0).toLocaleUpperCase()}${category.substring(1)}` %>**
8+
* **<%= `${category.charAt(0).toLocaleUpperCase()}${category.substring(1)}` %>**<% if (category === "community") { %> *(provided and maintained by contributors)*<% } %>
89
<% } -%>
9-
* [<%- name %>](/source/plugins/<%= plugin %>/README.md)<%# -%>
10+
* [<%- name %>](/source/plugins/<%= plugin %>/README.md)<% if (category === "community") { %> <%- authors.map(author => `[@${author}](https://github.com/${author})`).join(" ") %><% } %><%# -%>
1011
<% }} %>

.github/readme/partials/introduction.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Generate your metrics that you can embed everywhere, including your GitHub profi
1515
</table>
1616
<% {
1717
let cell = 0
18-
const elements = Object.entries(plugins).filter(([key, value]) => (value)&&(!["base", "core"].includes(key)))
18+
const elements = Object.entries(plugins).filter(([key, value]) => (value)&&(!["base", "core"].includes(key)&&(!value.community)))
1919
%>
2020

2121
And you can customize these heavily with plugins, templates and hundreds of options!
@@ -34,7 +34,7 @@ And you can customize these heavily with plugins, templates and hundreds of opti
3434
if (cell === "even") {
3535
-%>
3636
<tr>
37-
<% } %> <th><a href="source/plugins/<%= plugin %>/README.md"><%= name -%></a></th>
37+
<% } %> <th><% if (plugin) { %><a href="source/plugins/<%= plugin %>/README.md"><%= name -%></a><% } %></th>
3838
<% if (cell === "odd") {
3939
-%> </tr>
4040
<% }}

CONTRIBUTING.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Review below which contributions are accepted:
2626
<td>✔️</td>
2727
<td>
2828
<ul>
29-
<li>New plugins are welcomed provided they're not redundant with existing plugins</li>
29+
<li>New plugins are welcomed provided they're functional and not redundant with existing plugins</li>
3030
<li>New features for existing plugins are allowed but must be optional</li>
3131
</ul>
3232
</td>
@@ -423,12 +423,12 @@ For example:
423423
Here's an example:
424424
```yaml
425425
name: "🧩 Plugin name (with emoji icon)"
426-
category: github # Plugin category ("github", "social" or "other")
427-
index: ~ # Leave as it (this is used to order plugins on metrics README.md)
426+
category: community # Leave as it
427+
index: ~ # Leave as it
428428
supports:
429-
- user # Support users account
430-
- organization # Support organizations account
431-
- repository # Support repositories metrics
429+
- user # Support users account
430+
- organization # Support organizations account
431+
- repository # Support repositories metrics
432432
inputs:
433433
434434
# A comment detailing input purposes

source/app/metrics/metadata.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import path from "path"
55
import url from "url"
66

77
//Defined categories
8-
const categories = ["core", "github", "social", "other"]
8+
const categories = ["core", "github", "social", "other", "community"]
99

1010
/**Metadata descriptor parser */
1111
export default async function metadata({log = true} = {}) {

source/plugins/nightscout/metadata.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: "💉 Nightscout"
2-
category: other
2+
category: community
3+
authors:
4+
- legoandmars
35
index: 3
46
supports:
57
- user

0 commit comments

Comments
 (0)