diff --git a/.github/readme/partials/documentation/organizations.md b/.github/readme/partials/documentation/organizations.md index 7281180f..e47ecdd8 100644 --- a/.github/readme/partials/documentation/organizations.md +++ b/.github/readme/partials/documentation/organizations.md @@ -1,12 +1,12 @@ # 🏦 Configure metrics for organizations -While metrics targets mainly user accounts, it's possible to render metrics for organization accounts. +While *metrics* targets mainly user accounts, it's possible to render metrics for organization accounts. ![Metrics (organization account)](https://github.com/lowlighter/metrics/blob/examples/metrics.organization.svg) ## *️⃣ Using *metrics* on organization -Setup is the same as for user accounts, and a personal access token from an user account is required excepted that `read:org` scope must be enabled, **whether you are member of the target organization or not**. +Setup is mostly the same as for user accounts. A personal access token from an user account is required excepted that `read:org` scope must be enabled, **whether you are member of the target organization or not**. ![Add read:org scope to personal token](/.github/readme/imgs/setup_token_org_read_scope.png) @@ -26,6 +26,8 @@ Setup is the same as for user accounts, and a personal access token from an user > 💡 To support private repositories, add `repo` scope +It is possible to host workflows in the `.github` repository of organizations, and display *metrics* on [organization profiles](https://docs.github.com/en/organizations/collaborating-with-groups-in-organizations/customizing-your-organizations-profile). + ## *️⃣ Organizations memberships for user accounts By default, GitHub only display public memberships. diff --git a/source/plugins/core/README.md b/source/plugins/core/README.md index 4f47609b..681d841e 100644 --- a/source/plugins/core/README.md +++ b/source/plugins/core/README.md @@ -74,7 +74,7 @@ Additional CSS can be injected using `extras_css` option. > ⚠️ CSS styles may slightly change between releases, backward compatibility is not guaranteed! -## 🎨 Custom JavaScript scripting +## 🗳️ Custom JavaScript scripting Additional JavaScript can be injected using `extras_js` option. @@ -87,6 +87,9 @@ Additional JavaScript can be injected using `extras_js` option. document.querySelectorAll("h2")?.forEach(h2 => h2.remove()) ``` +> ℹ️ JavaScript is executed in puppeteer context during the rendering phase, **not** in *metrics* context. +> It will be possible to access `document` and all other features accessibles like if the SVG was opened in a browser page + > 💡 If you make an heavy use of this option, creating a [community templates](/source/templates/community/README.md) may be a better alternative > ⚠️ HTML elements may slightly change between releases, backward compatibility is not guaranteed! @@ -101,7 +104,7 @@ Tweak `config_padding` option to manually adjust padding and solve this issue. This settings supports the following format: - 1 value for both width and height -- 2 values for width fist and height second, separated by a comma (`,`) +- 2 values for width first and height second, separated by a comma (`,`) > 💡 Both negative and positive values are allowed