docs: add support for disclaimer and notes
This commit is contained in:
@@ -98,9 +98,11 @@ metadata.plugin = async function({__plugins, __templates, name, logger}) {
|
|||||||
const {inputs, ...meta} = yaml.load(raw)
|
const {inputs, ...meta} = yaml.load(raw)
|
||||||
Object.assign(metadata.inputs, inputs)
|
Object.assign(metadata.inputs, inputs)
|
||||||
|
|
||||||
//category
|
//Category
|
||||||
if (!categories.includes(meta.category))
|
if (!categories.includes(meta.category))
|
||||||
meta.category = "community"
|
meta.category = "community"
|
||||||
|
if ((meta.category === "github")&&(!meta.disclaimer))
|
||||||
|
meta.disclaimer = "This plugin is not affiliated, associated, authorized, endorsed by, or in any way officially connected with [GitHub](https://github.com).\nAll product and company names are trademarks™ or registered® trademarks of their respective holders."
|
||||||
|
|
||||||
//Inputs parser
|
//Inputs parser
|
||||||
{
|
{
|
||||||
@@ -397,6 +399,8 @@ metadata.plugin = async function({__plugins, __templates, name, logger}) {
|
|||||||
` <tr><th colspan="2"><h3>${meta.name}</h3></th></tr>`,
|
` <tr><th colspan="2"><h3>${meta.name}</h3></th></tr>`,
|
||||||
` <tr><td colspan="2" align="center">${marked.parse(meta.description ?? "", {silent: true})}</td></tr>`,
|
` <tr><td colspan="2" align="center">${marked.parse(meta.description ?? "", {silent: true})}</td></tr>`,
|
||||||
meta.deprecation ? ` <tr><th>⚠️ Deprecated</th><td>${marked.parse(meta.deprecation ?? "", {silent: true})}</td></tr>` : "",
|
meta.deprecation ? ` <tr><th>⚠️ Deprecated</th><td>${marked.parse(meta.deprecation ?? "", {silent: true})}</td></tr>` : "",
|
||||||
|
meta.disclaimer ? ` <tr><th>⚠️ Disclaimer</th><td>${marked.parse(meta.disclaimer ?? "", {silent: true})}</td></tr>` : "",
|
||||||
|
meta.notes ? ` <tr><th>ℹ Additional notes</th><td>${marked.parse(meta.notes ?? "", {silent: true})}</td></tr>` : "",
|
||||||
meta.authors?.length ? `<tr><th>Authors</th><td>${[meta.authors].flat().map(author => `<a href="https://github.com/${author}">@${author}</a>`)}</td></tr>` : "",
|
meta.authors?.length ? `<tr><th>Authors</th><td>${[meta.authors].flat().map(author => `<a href="https://github.com/${author}">@${author}</a>`)}</td></tr>` : "",
|
||||||
" <tr>",
|
" <tr>",
|
||||||
' <th rowspan="3">Supported features<br><sub><a href="metadata.yml">→ Full specification</a></sub></th>',
|
' <th rowspan="3">Supported features<br><sub><a href="metadata.yml">→ Full specification</a></sub></th>',
|
||||||
|
|||||||
@@ -2,6 +2,9 @@ name: 🌸 Anilist watch list and reading list
|
|||||||
category: social
|
category: social
|
||||||
description: |
|
description: |
|
||||||
This plugin displays favorites animes, mangas and characters from a [AniList](https://anilist.co) account.
|
This plugin displays favorites animes, mangas and characters from a [AniList](https://anilist.co) account.
|
||||||
|
disclaimer: |
|
||||||
|
This plugin is not affiliated, associated, authorized, endorsed by, or in any way officially connected with [AniList](https://anilist.co).
|
||||||
|
All product and company names are trademarks™ or registered® trademarks of their respective holders.
|
||||||
examples:
|
examples:
|
||||||
+for anime watchers: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.anilist.svg
|
+for anime watchers: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.anilist.svg
|
||||||
for manga readers: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.anilist.manga.svg
|
for manga readers: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.anilist.manga.svg
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ name: ♐ Random code snippet
|
|||||||
category: github
|
category: github
|
||||||
description: |
|
description: |
|
||||||
This plugin displays a random code snippet from recent activity history.
|
This plugin displays a random code snippet from recent activity history.
|
||||||
|
notes: |
|
||||||
> ⚠️ When improperly configured, this plugin could display private code.
|
> ⚠️ When improperly configured, this plugin could display private code.
|
||||||
> If you work with sensitive data or company code, it is advised to keep this plugin disabled.
|
> If you work with sensitive data or company code, it is advised to keep this plugin disabled.
|
||||||
> Use at your own risk, *metrics* and its authors cannot be held responsible for any resulting code leaks.
|
> Use at your own risk, *metrics* and its authors cannot be held responsible for any resulting code leaks.
|
||||||
|
|||||||
@@ -2,6 +2,9 @@ name: 💉 Nightscout
|
|||||||
category: community
|
category: community
|
||||||
description: |
|
description: |
|
||||||
This plugin displays blood sugar values from a [Nightscout](http://nightscout.info) site.
|
This plugin displays blood sugar values from a [Nightscout](http://nightscout.info) site.
|
||||||
|
disclaimer: |
|
||||||
|
This plugin is not affiliated, associated, authorized, endorsed by, or in any way officially connected with [Nightscout](http://nightscout.info).
|
||||||
|
All product and company names are trademarks™ or registered® trademarks of their respective holders.
|
||||||
examples:
|
examples:
|
||||||
default: https://github.com/legoandmars/legoandmars/blob/master/metrics.plugin.nightscout.svg
|
default: https://github.com/legoandmars/legoandmars/blob/master/metrics.plugin.nightscout.svg
|
||||||
authors:
|
authors:
|
||||||
|
|||||||
@@ -2,6 +2,9 @@ name: 💩 PoopMap plugin
|
|||||||
category: community
|
category: community
|
||||||
description: |
|
description: |
|
||||||
This plugin displays statistics from a [PoopMap](https://poopmap.net) account.
|
This plugin displays statistics from a [PoopMap](https://poopmap.net) account.
|
||||||
|
disclaimer: |
|
||||||
|
This plugin is not affiliated, associated, authorized, endorsed by, or in any way officially connected with [PoopMap](https://poopmap.net).
|
||||||
|
All product and company names are trademarks™ or registered® trademarks of their respective holders.
|
||||||
examples:
|
examples:
|
||||||
default: https://github.com/matievisthekat/matievisthekat/blob/master/metrics.plugin.poopmap.svg
|
default: https://github.com/matievisthekat/matievisthekat/blob/master/metrics.plugin.poopmap.svg
|
||||||
authors:
|
authors:
|
||||||
|
|||||||
@@ -2,6 +2,11 @@ name: 📜 Repository licenses
|
|||||||
category: github
|
category: github
|
||||||
description: |
|
description: |
|
||||||
This plugin display repository license informations like permissions, limitations and conditions along with additional stats about dependencies.
|
This plugin display repository license informations like permissions, limitations and conditions along with additional stats about dependencies.
|
||||||
|
notes: |
|
||||||
|
> ⚠️ This is **NOT** legal advice, use at your own risk
|
||||||
|
|
||||||
|
> 💣 This plugin **SHOULD NOT** be enabled on web instances, since it allows raw command injection.
|
||||||
|
> This could result in compromised server!
|
||||||
examples:
|
examples:
|
||||||
+permissions, limitations and conditions: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.licenses.svg
|
+permissions, limitations and conditions: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.licenses.svg
|
||||||
+licenses overview: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.licenses.ratio.svg
|
+licenses overview: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.licenses.ratio.svg
|
||||||
|
|||||||
@@ -4,6 +4,9 @@ description: |
|
|||||||
This plugin can display top and recently listened music tracks or titles from a random playlist.
|
This plugin can display top and recently listened music tracks or titles from a random playlist.
|
||||||
|
|
||||||
Different music providers are supported.
|
Different music providers are supported.
|
||||||
|
disclaimer: |
|
||||||
|
This plugin is not affiliated, associated, authorized, endorsed by, or in any way officially connected with any of the supported provider.
|
||||||
|
All product and company names are trademarks™ or registered® trademarks of their respective holders.
|
||||||
examples:
|
examples:
|
||||||
+random tracks from a playlist: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.music.playlist.svg
|
+random tracks from a playlist: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.music.playlist.svg
|
||||||
+recently listened: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.music.recent.svg
|
+recently listened: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.music.recent.svg
|
||||||
|
|||||||
@@ -4,6 +4,9 @@ description: |
|
|||||||
This plugin displays performance statistics of a website.
|
This plugin displays performance statistics of a website.
|
||||||
|
|
||||||
It uses [Google's PageSpeed API](https://developers.google.com/speed/docs/insights/v5/get-started) (same as [web.dev](https://web.dev)), see [performance scoring](https://web.dev/performance-scoring/) and [score calculator](https://googlechrome.github.io/lighthouse/scorecalc/) for more informations about results.
|
It uses [Google's PageSpeed API](https://developers.google.com/speed/docs/insights/v5/get-started) (same as [web.dev](https://web.dev)), see [performance scoring](https://web.dev/performance-scoring/) and [score calculator](https://googlechrome.github.io/lighthouse/scorecalc/) for more informations about results.
|
||||||
|
disclaimer: |
|
||||||
|
This plugin is not affiliated, associated, authorized, endorsed by, or in any way officially connected with [Google PageSpeed](https://pagespeed.web.dev/).
|
||||||
|
All product and company names are trademarks™ or registered® trademarks of their respective holders.
|
||||||
examples:
|
examples:
|
||||||
+PageSpeed scores: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.pagespeed.svg
|
+PageSpeed scores: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.pagespeed.svg
|
||||||
PageSpeed scores with detailed report: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.pagespeed.detailed.svg
|
PageSpeed scores with detailed report: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.pagespeed.detailed.svg
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ name: 🗂️ GitHub projects
|
|||||||
category: github
|
category: github
|
||||||
description: |
|
description: |
|
||||||
This plugin displays progress of profile and repository projects.
|
This plugin displays progress of profile and repository projects.
|
||||||
|
notes: |
|
||||||
> ℹ️ This plugin currently only supports [GitHub projects boards](https://docs.github.com/en/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards) and not [GitHub projects (beta)](https://docs.github.com/en/issues/trying-out-the-new-projects-experience/about-projects)
|
> ℹ️ This plugin currently only supports [GitHub projects boards](https://docs.github.com/en/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards) and not [GitHub projects (beta)](https://docs.github.com/en/issues/trying-out-the-new-projects-experience/about-projects)
|
||||||
examples:
|
examples:
|
||||||
default: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.projects.svg
|
default: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.projects.svg
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ description: |
|
|||||||
This plugin displays a list of chosen featured repositories.
|
This plugin displays a list of chosen featured repositories.
|
||||||
|
|
||||||
Since it is possible to [pin repositories](https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/pinning-items-to-your-profile) on GitHub, this plugin is mostly intended for external usage.
|
Since it is possible to [pin repositories](https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/pinning-items-to-your-profile) on GitHub, this plugin is mostly intended for external usage.
|
||||||
|
notes: |
|
||||||
> ⚠️ Due to limitations of using SVG images inside `<img>` tags, clicking on a repository card will not redirect to repository page.
|
> ⚠️ Due to limitations of using SVG images inside `<img>` tags, clicking on a repository card will not redirect to repository page.
|
||||||
examples:
|
examples:
|
||||||
+featured: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.repositories.svg
|
+featured: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.repositories.svg
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ name: 🌇 GitHub Skyline
|
|||||||
category: github
|
category: github
|
||||||
description: |
|
description: |
|
||||||
This plugin displays the 3D commits calendar from [skyline.github.com](https://skyline.github.com/).
|
This plugin displays the 3D commits calendar from [skyline.github.com](https://skyline.github.com/).
|
||||||
|
notes: |
|
||||||
> ⚠️ This plugin significantly increase file size, consider using it as standalone.
|
> ⚠️ This plugin significantly increase file size, consider using it as standalone.
|
||||||
examples:
|
examples:
|
||||||
+GitHub Skyline: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.skyline.svg
|
+GitHub Skyline: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.skyline.svg
|
||||||
|
|||||||
@@ -2,6 +2,9 @@ name: 🗨️ Stack Overflow
|
|||||||
category: social
|
category: social
|
||||||
description: |
|
description: |
|
||||||
This plugin displays stats, questions and answer from [Stack Overflow](https://stackoverflow.com/).
|
This plugin displays stats, questions and answer from [Stack Overflow](https://stackoverflow.com/).
|
||||||
|
disclaimer: |
|
||||||
|
This plugin is not affiliated, associated, authorized, endorsed by, or in any way officially connected with [Stack Overflow](https://stackoverflow.com/).
|
||||||
|
All product and company names are trademarks™ or registered® trademarks of their respective holders.
|
||||||
examples:
|
examples:
|
||||||
default: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.stackoverflow.svg
|
default: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.stackoverflow.svg
|
||||||
index: 3
|
index: 3
|
||||||
|
|||||||
@@ -2,6 +2,9 @@ name: 🐤 Latest tweets
|
|||||||
category: social
|
category: social
|
||||||
description: |
|
description: |
|
||||||
This plugin displays the latest tweets from a [Twitter](https://twitter.com) account.
|
This plugin displays the latest tweets from a [Twitter](https://twitter.com) account.
|
||||||
|
disclaimer: |
|
||||||
|
This plugin is not affiliated, associated, authorized, endorsed by, or in any way officially connected with [Twitter](https://twitter.com).
|
||||||
|
All product and company names are trademarks™ or registered® trademarks of their respective holders.
|
||||||
examples:
|
examples:
|
||||||
+latest tweets with attachments: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.tweets.attachments.svg
|
+latest tweets with attachments: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.tweets.attachments.svg
|
||||||
latest tweets: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.tweets.svg
|
latest tweets: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.tweets.svg
|
||||||
|
|||||||
@@ -4,6 +4,9 @@ description: |
|
|||||||
This plugin displays statistics from a [WakaTime](https://wakatime.com) account.
|
This plugin displays statistics from a [WakaTime](https://wakatime.com) account.
|
||||||
|
|
||||||
It is also compatible with self-hosted instances from [wakapi](https://github.com/muety/wakapi).
|
It is also compatible with self-hosted instances from [wakapi](https://github.com/muety/wakapi).
|
||||||
|
disclaimer: |
|
||||||
|
This plugin is not affiliated, associated, authorized, endorsed by, or in any way officially connected with [WakaTime](https://wakatime.com).
|
||||||
|
All product and company names are trademarks™ or registered® trademarks of their respective holders.
|
||||||
examples:
|
examples:
|
||||||
default: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.wakatime.svg
|
default: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.wakatime.svg
|
||||||
index: 8
|
index: 8
|
||||||
|
|||||||
Reference in New Issue
Block a user