docs: minor changes [skip ci]

This commit is contained in:
lowlighter
2022-01-21 20:36:46 -05:00
parent 9ddfa49ef5
commit 2b42019e2c
2 changed files with 9 additions and 4 deletions

View File

@@ -1,12 +1,12 @@
# 🏦 Configure metrics for organizations # 🏦 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) ![Metrics (organization account)](https://github.com/lowlighter/metrics/blob/examples/metrics.organization.svg)
## *️⃣ Using *metrics* on organization ## *️⃣ 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) ![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 > 💡 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 ## *️⃣ Organizations memberships for user accounts
By default, GitHub only display public memberships. By default, GitHub only display public memberships.

View File

@@ -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! > ⚠️ 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. 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()) 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 > 💡 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! > ⚠️ 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: This settings supports the following format:
- 1 value for both width and height - 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 > 💡 Both negative and positive values are allowed