Fix misspelling of "category" (related to #340) [skip ci]
This commit is contained in:
4
.github/preview.mjs
vendored
4
.github/preview.mjs
vendored
@@ -22,7 +22,7 @@
|
|||||||
const {conf, Templates} = await setup({nosettings:true, log:false})
|
const {conf, Templates} = await setup({nosettings:true, log:false})
|
||||||
const templates = Object.entries(Templates).map(([name]) => ({name, enabled:true}))
|
const templates = Object.entries(Templates).map(([name]) => ({name, enabled:true}))
|
||||||
const metadata = Object.fromEntries(Object.entries(conf.metadata.plugins)
|
const metadata = Object.fromEntries(Object.entries(conf.metadata.plugins)
|
||||||
.map(([key, value]) => [key, Object.fromEntries(Object.entries(value).filter(([key]) => ["name", "icon", "categorie", "web", "supports"].includes(key)))])
|
.map(([key, value]) => [key, Object.fromEntries(Object.entries(value).filter(([key]) => ["name", "icon", "category", "web", "supports"].includes(key)))])
|
||||||
.map(([key, value]) => [key, key === "core" ? {...value, web:Object.fromEntries(Object.entries(value.web).filter(([key]) => /^config[.]/.test(key)).map(([key, value]) => [key.replace(/^config[.]/, ""), value]))} : value]))
|
.map(([key, value]) => [key, key === "core" ? {...value, web:Object.fromEntries(Object.entries(value.web).filter(([key]) => /^config[.]/.test(key)).map(([key, value]) => [key.replace(/^config[.]/, ""), value]))} : value]))
|
||||||
|
|
||||||
|
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
fs.copyFile(paths.join(__web, "favicon.png"), paths.join(__preview, ".favicon.png"))
|
fs.copyFile(paths.join(__web, "favicon.png"), paths.join(__preview, ".favicon.png"))
|
||||||
fs.copyFile(paths.join(__web, "opengraph.png"), paths.join(__preview, ".opengraph.png"))
|
fs.copyFile(paths.join(__web, "opengraph.png"), paths.join(__preview, ".opengraph.png"))
|
||||||
//Plugins and templates
|
//Plugins and templates
|
||||||
fs.writeFile(paths.join(__preview, ".plugins"), JSON.stringify(Object.entries(metadata).filter(([_name, {categorie}]) => categorie !== "core").map(([name]) => ({name, enabled:false}))))
|
fs.writeFile(paths.join(__preview, ".plugins"), JSON.stringify(Object.entries(metadata).filter(([_name, {category}]) => category !== "core").map(([name]) => ({name, enabled:false}))))
|
||||||
fs.writeFile(paths.join(__preview, ".plugins.base"), JSON.stringify(conf.settings.plugins.base.parts))
|
fs.writeFile(paths.join(__preview, ".plugins.base"), JSON.stringify(conf.settings.plugins.base.parts))
|
||||||
fs.writeFile(paths.join(__preview, ".plugins.metadata"), JSON.stringify(metadata))
|
fs.writeFile(paths.join(__preview, ".plugins.metadata"), JSON.stringify(metadata))
|
||||||
fs.writeFile(paths.join(__preview, ".templates__"), JSON.stringify(templates))
|
fs.writeFile(paths.join(__preview, ".templates__"), JSON.stringify(templates))
|
||||||
|
|||||||
2
.github/quickstart/plugin/metadata.yml
vendored
2
.github/quickstart/plugin/metadata.yml
vendored
@@ -1,6 +1,6 @@
|
|||||||
name: "🧩 <%= `${name.charAt(0).toLocaleUpperCase()}${name.substring(1)}` %>"
|
name: "🧩 <%= `${name.charAt(0).toLocaleUpperCase()}${name.substring(1)}` %>"
|
||||||
cost: Estimates how many GitHub requests is used during plugin execution ("N/A" for Third-Party services)
|
cost: Estimates how many GitHub requests is used during plugin execution ("N/A" for Third-Party services)
|
||||||
categorie: other # Set plugin categorie ("github", "social" or "other")
|
category: other # Set plugin category ("github", "social" or "other")
|
||||||
supports:
|
supports:
|
||||||
- user # Support users account
|
- user # Support users account
|
||||||
- organization # Support organizations account
|
- organization # Support organizations account
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
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, categorie}] of Object.entries(plugins).filter(([key, value]) => value).sort(([an, a], [bn, b]) => a.categorie === b.categorie ? an.localeCompare(bn) : 0)) { %>
|
<% { 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)) { %>
|
||||||
<% if (previous !== categorie) { previous = categorie -%>
|
<% if (previous !== category) { previous = category -%>
|
||||||
* **<%= `${categorie.charAt(0).toLocaleUpperCase()}${categorie.substring(1)}` %>**
|
* **<%= `${category.charAt(0).toLocaleUpperCase()}${category.substring(1)}` %>**
|
||||||
<% } -%>
|
<% } -%>
|
||||||
* [<%- name %>](/source/plugins/<%= plugin %>/README.md)<%# -%>
|
* [<%- name %>](/source/plugins/<%= plugin %>/README.md)<%# -%>
|
||||||
<% }} %>
|
<% }} %>
|
||||||
|
|||||||
Reference in New Issue
Block a user