docs: split community plugins from core maintained ones
This commit is contained in:
2
.github/quickstart/plugin/metadata.yml
vendored
2
.github/quickstart/plugin/metadata.yml
vendored
@@ -1,5 +1,5 @@
|
|||||||
name: "🧩 <%= `${name.charAt(0).toLocaleUpperCase()}${name.substring(1)}` %>"
|
name: "🧩 <%= `${name.charAt(0).toLocaleUpperCase()}${name.substring(1)}` %>"
|
||||||
category: other # Set plugin category ("github", "social" or "other")
|
category: community # Leave as it
|
||||||
supports:
|
supports:
|
||||||
- user # Support users account
|
- user # Support users account
|
||||||
- organization # Support organizations account
|
- organization # Support organizations account
|
||||||
|
|||||||
@@ -3,13 +3,13 @@
|
|||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<th nowrap="nowrap">Template/Plugin</th><%# -%>
|
<th nowrap="nowrap">Template/Plugin</th><%# -%>
|
||||||
<% for (const [plugin, {name, icon}] of Object.entries(plugins).filter(([key, value]) => (value)&&(!["core"].includes(key)))) { %>
|
<% for (const [plugin, {name, icon}] of Object.entries(plugins).filter(([key, value]) => (value)&&(!["core"].includes(key))&&(value.category !== "community"))) { %>
|
||||||
<th nowrap="nowrap" align="center" title="<%= name %>"><%= icon %></th><% } %>
|
<th nowrap="nowrap" align="center" title="<%= name %>"><%= icon %></th><% } %>
|
||||||
</tr><%# -%>
|
</tr><%# -%>
|
||||||
<% for (const [template, {name, readme}] of Object.entries(templates).filter(([key, value]) => (value)&&(!["community"].includes(key)))) { %>
|
<% for (const [template, {name, readme}] of Object.entries(templates).filter(([key, value]) => (value)&&(!["community"].includes(key)))) { %>
|
||||||
<tr>
|
<tr>
|
||||||
<td nowrap="nowrap"><%- name %></td><%# -%>
|
<td nowrap="nowrap"><%- name %></td><%# -%>
|
||||||
<% for (const [plugin] of Object.entries(plugins).filter(([key, value]) => (value)&&(!["core"].includes(key)))) { %>
|
<% for (const [plugin] of Object.entries(plugins).filter(([key, value]) => (value)&&(!["core"].includes(key))&&(value.category !== "community"))) { %>
|
||||||
<td nowrap="nowrap" align="center" data-plugin="<%= plugin %>"><%= {true:"✔️", false:"❌", embed:"✓"}[readme.compatibility[plugin]] %></td><% } %>
|
<td nowrap="nowrap" align="center" data-plugin="<%= plugin %>"><%= {true:"✔️", false:"❌", embed:"✓"}[readme.compatibility[plugin]] %></td><% } %>
|
||||||
</tr><% } %>
|
</tr><% } %>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -17,13 +17,13 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th nowrap="nowrap">Mode/Plugin</th><%# -%>
|
<th nowrap="nowrap">Mode/Plugin</th><%# -%>
|
||||||
<% for (const [plugin, {name, icon}] of Object.entries(plugins).filter(([key, value]) => (value)&&(!["core"].includes(key)))) { %>
|
<% for (const [plugin, {name, icon}] of Object.entries(plugins).filter(([key, value]) => (value)&&(!["core"].includes(key))&&(value.category !== "community"))) { %>
|
||||||
<th nowrap="nowrap" align="center" title="<%= name %>"><%= icon %></th><% } %>
|
<th nowrap="nowrap" align="center" title="<%= name %>"><%= icon %></th><% } %>
|
||||||
</tr><%# -%>
|
</tr><%# -%>
|
||||||
<% for (const {mode, icon} of [{mode:"user", icon:"👤"}, {mode:"organization", icon:"👥"}, {mode:"repository", icon:"📓"}]) { %>
|
<% for (const {mode, icon} of [{mode:"user", icon:"👤"}, {mode:"organization", icon:"👥"}, {mode:"repository", icon:"📓"}]) { %>
|
||||||
<tr>
|
<tr>
|
||||||
<td nowrap="nowrap"><%= icon %> <%- `${mode.charAt(0).toLocaleUpperCase()}${mode.substring(1)}` %></td><%# -%>
|
<td nowrap="nowrap"><%= icon %> <%- `${mode.charAt(0).toLocaleUpperCase()}${mode.substring(1)}` %></td><%# -%>
|
||||||
<% for (const [plugin, {supports}] of Object.entries(plugins).filter(([key, value]) => (value)&&(!["core"].includes(key)))) {%>
|
<% for (const [plugin, {supports}] of Object.entries(plugins).filter(([key, value]) => (value)&&(!["core"].includes(key))&&(value.category !== "community"))) {%>
|
||||||
<td nowrap="nowrap" align="center" data-plugin="<%= plugin %>"><%= supports.includes(mode) ? "✔️" : "❌" %></td><% } %>
|
<td nowrap="nowrap" align="center" data-plugin="<%= plugin %>"><%= supports.includes(mode) ? "✔️" : "❌" %></td><% } %>
|
||||||
</tr><% } %>
|
</tr><% } %>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
## 🧩 Plugins
|
## 🧩 Plugins
|
||||||
|
|
||||||
Plugins are features which provide additional content and lets you customize your rendered metrics.
|
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}] of Object.entries(plugins).filter(([key, value]) => value).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).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)}` %>**<% if (category === "community") { %> *(provided and maintained by contributors)*<% } %>
|
||||||
<% } -%>
|
<% } -%>
|
||||||
* [<%- name %>](/source/plugins/<%= plugin %>/README.md)<%# -%>
|
* [<%- name %>](/source/plugins/<%= plugin %>/README.md)<% if (category === "community") { %> <%- authors.map(author => `[@${author}](https://github.com/${author})`).join(" ") %><% } %><%# -%>
|
||||||
<% }} %>
|
<% }} %>
|
||||||
|
|||||||
4
.github/readme/partials/introduction.md
vendored
4
.github/readme/partials/introduction.md
vendored
@@ -15,7 +15,7 @@ Generate your metrics that you can embed everywhere, including your GitHub profi
|
|||||||
</table>
|
</table>
|
||||||
<% {
|
<% {
|
||||||
let cell = 0
|
let cell = 0
|
||||||
const elements = Object.entries(plugins).filter(([key, value]) => (value)&&(!["base", "core"].includes(key)))
|
const elements = Object.entries(plugins).filter(([key, value]) => (value)&&(!["base", "core"].includes(key)&&(!value.community)))
|
||||||
%>
|
%>
|
||||||
|
|
||||||
And you can customize these heavily with plugins, templates and hundreds of options!
|
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
|
|||||||
if (cell === "even") {
|
if (cell === "even") {
|
||||||
-%>
|
-%>
|
||||||
<tr>
|
<tr>
|
||||||
<% } %> <th><a href="source/plugins/<%= plugin %>/README.md"><%= name -%></a></th>
|
<% } %> <th><% if (plugin) { %><a href="source/plugins/<%= plugin %>/README.md"><%= name -%></a><% } %></th>
|
||||||
<% if (cell === "odd") {
|
<% if (cell === "odd") {
|
||||||
-%> </tr>
|
-%> </tr>
|
||||||
<% }}
|
<% }}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ Review below which contributions are accepted:
|
|||||||
<td>✔️</td>
|
<td>✔️</td>
|
||||||
<td>
|
<td>
|
||||||
<ul>
|
<ul>
|
||||||
<li>New plugins are welcomed provided they're not redundant with existing plugins</li>
|
<li>New plugins are welcomed provided they're functional and not redundant with existing plugins</li>
|
||||||
<li>New features for existing plugins are allowed but must be optional</li>
|
<li>New features for existing plugins are allowed but must be optional</li>
|
||||||
</ul>
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
@@ -423,8 +423,8 @@ For example:
|
|||||||
Here's an example:
|
Here's an example:
|
||||||
```yaml
|
```yaml
|
||||||
name: "🧩 Plugin name (with emoji icon)"
|
name: "🧩 Plugin name (with emoji icon)"
|
||||||
category: github # Plugin category ("github", "social" or "other")
|
category: community # Leave as it
|
||||||
index: ~ # Leave as it (this is used to order plugins on metrics README.md)
|
index: ~ # Leave as it
|
||||||
supports:
|
supports:
|
||||||
- user # Support users account
|
- user # Support users account
|
||||||
- organization # Support organizations account
|
- organization # Support organizations account
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import path from "path"
|
|||||||
import url from "url"
|
import url from "url"
|
||||||
|
|
||||||
//Defined categories
|
//Defined categories
|
||||||
const categories = ["core", "github", "social", "other"]
|
const categories = ["core", "github", "social", "other", "community"]
|
||||||
|
|
||||||
/**Metadata descriptor parser */
|
/**Metadata descriptor parser */
|
||||||
export default async function metadata({log = true} = {}) {
|
export default async function metadata({log = true} = {}) {
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
name: "💉 Nightscout"
|
name: "💉 Nightscout"
|
||||||
category: other
|
category: community
|
||||||
|
authors:
|
||||||
|
- legoandmars
|
||||||
index: 3
|
index: 3
|
||||||
supports:
|
supports:
|
||||||
- user
|
- user
|
||||||
|
|||||||
Reference in New Issue
Block a user