From 88fbc7ae41e624c3a80df0a390138d6d9fa85e55 Mon Sep 17 00:00:00 2001 From: Simon Lecoq <22963968+lowlighter@users.noreply.github.com> Date: Mon, 2 Nov 2020 22:02:09 +0100 Subject: [PATCH] Update CONTRIBUTING.md --- CONTRIBUTING.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 20507530..8bb953dd 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -15,12 +15,14 @@ To use [GitHub Rest API](https://docs.github.com/en/rest) or a third-party servi Plugins should be self-sufficient and re-exported from [src/plugins/index.mjs](https://github.com/lowlighter/metrics/blob/master/src/plugins/index.mjs), to be later included in the `//Plugins` section of `templates/*/template.mjs`. Data generated should be exposed in `data.computed.plugins[plugin]` where `plugin` is your plugin's name. -#### Updating the SVG template +#### Updating SVG templates -The SVG template is located in `templates/*/image.svg` and include the CSS from `templates/*/style.css`. +The SVG templates are located in `templates/*/image.svg` and include CSS from `templates/*/style.css`. It is rendered with [EJS](https://github.com/mde/ejs) so you can actually include variables (e.g. `<%= user.name %>`) and execute simple code, like control statements. +It should handle plugins errors gracefully by displaying the error message. + #### Metrics server and GitHub action Most of the time, you won't need to edit these, unless you're integrating features directly tied to them.