Fix misspelling of "category" (related to #340) [skip ci]

This commit is contained in:
lowlighter
2021-05-28 23:59:11 +02:00
parent 559d0f0102
commit 8efbc753a4
3 changed files with 6 additions and 6 deletions

4
.github/preview.mjs vendored
View File

@@ -22,7 +22,7 @@
const {conf, Templates} = await setup({nosettings:true, log:false})
const templates = Object.entries(Templates).map(([name]) => ({name, enabled:true}))
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]))
@@ -39,7 +39,7 @@
fs.copyFile(paths.join(__web, "favicon.png"), paths.join(__preview, ".favicon.png"))
fs.copyFile(paths.join(__web, "opengraph.png"), paths.join(__preview, ".opengraph.png"))
//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.metadata"), JSON.stringify(metadata))
fs.writeFile(paths.join(__preview, ".templates__"), JSON.stringify(templates))

View File

@@ -1,6 +1,6 @@
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)
categorie: other # Set plugin categorie ("github", "social" or "other")
category: other # Set plugin category ("github", "social" or "other")
supports:
- user # Support users account
- organization # Support organizations account

View File

@@ -2,9 +2,9 @@
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:
<% { 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)) { %>
<% if (previous !== categorie) { previous = categorie -%>
* **<%= `${categorie.charAt(0).toLocaleUpperCase()}${categorie.substring(1)}` %>**
<% { 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 !== category) { previous = category -%>
* **<%= `${category.charAt(0).toLocaleUpperCase()}${category.substring(1)}` %>**
<% } -%>
* [<%- name %>](/source/plugins/<%= plugin %>/README.md)<%# -%>
<% }} %>