diff --git a/.github/preview.mjs b/.github/preview.mjs index 4b00396a..392ccbcd 100644 --- a/.github/preview.mjs +++ b/.github/preview.mjs @@ -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)) diff --git a/.github/quickstart/plugin/metadata.yml b/.github/quickstart/plugin/metadata.yml index 95d80ea5..c3bcf608 100644 --- a/.github/quickstart/plugin/metadata.yml +++ b/.github/quickstart/plugin/metadata.yml @@ -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 diff --git a/.github/readme/partials/documentation/plugins.md b/.github/readme/partials/documentation/plugins.md index 56c0461e..6a3ff845 100644 --- a/.github/readme/partials/documentation/plugins.md +++ b/.github/readme/partials/documentation/plugins.md @@ -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)<%# -%> <% }} %>