Skip to content

Commit

Permalink
Fix misspelling of "category" (related to #340) [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
lowlighter committed May 28, 2021
1 parent 559d0f0 commit 8efbc75
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/preview.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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]))


Expand All @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion .github/quickstart/plugin/metadata.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions .github/readme/partials/documentation/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)<%# -%>
<% }} %>

0 comments on commit 8efbc75

Please sign in to comment.