From 5b944a70aa0b902b1af88b35ae4de324b92fd398 Mon Sep 17 00:00:00 2001 From: lowlighter <22963968+lowlighter@users.noreply.github.com> Date: Sun, 16 Jan 2022 21:54:48 -0500 Subject: [PATCH] docs: community plugins (update) --- .../partials/templated/plugins.community.md | 27 +++++++++++-------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/.github/readme/partials/templated/plugins.community.md b/.github/readme/partials/templated/plugins.community.md index 743e79ac..a609bc0c 100644 --- a/.github/readme/partials/templated/plugins.community.md +++ b/.github/readme/partials/templated/plugins.community.md @@ -1,10 +1,15 @@ - - + + + @@ -192,13 +197,13 @@ Plugin partials should be able to handle gracefully their own state and errors. Below is a minimal snippet of a partial: ```ejs -<% if (plugins.{plugin_name}) { %> - <% if (plugins.{plugin_name}.error) { %> - <%= plugins.{plugin_name}.error.message %> - <% } else { %> - <%# content %> - <% } %> -<% } %> +<<%= "%" %> if (plugins.{plugin_name}) { <%= "%" %>> + <<%= "%" %> if (plugins.{plugin_name}.error) { <%= "%" %>> + <<%= "%=" %> plugins.{plugin_name}.error.message <%= "%" %>> + <<%= "%" %> } else { <%= "%" %>> + <<%= "%#" %> content <%= "%" %>> + <<%= "%" %> } <%= "%" %>> +<<%= "%" %> } <%= "%" %>> ``` Partials should have the match the same name as plugin handles, as they're used to display plugin compatibility in auto-generated header.

🎲 Community plugins

Additional plugins maintained by community for even more features!

🎲 Community plugins

Additional plugins maintained by community for even more features!
- <% for (const [plugin, {name, category}] of Object.entries(plugins).filter(([key, value]) => (value)&&(value.category === "community")).sort(([an, a], [bn, b]) => a.category === b.category ? an.localeCompare(bn) : 0)) { %><%# -%> - <%- name %> `<%= plugin %>` + <% for (const [plugin, {name, category}] of Object.entries(plugins).filter(([key, value], index) => (index%2 === 0)&&(value)&&(value.category === "community")).sort(([an, a], [bn, b]) => a.category === b.category ? an.localeCompare(bn) : 0)) { %><%# -%> + <%- name %> <%= plugin %>
<% } %> + +
+ <% for (const [plugin, {name, category}] of Object.entries(plugins).filter(([key, value], index) => (index%2 === 1)&&(value)&&(value.category === "community")).sort(([an, a], [bn, b]) => a.category === b.category ? an.localeCompare(bn) : 0)) { %><%# -%> + <%- name %> <%= plugin %>
<% } %>