diff --git a/.github/readme/README.md b/.github/readme/README.md index 469e9a31..a4334595 100644 --- a/.github/readme/README.md +++ b/.github/readme/README.md @@ -2,6 +2,6 @@ [![Build, test, analyze and publish](https://github.com/lowlighter/metrics/actions/workflows/workflow.yml/badge.svg)](https://github.com/lowlighter/metrics/actions/workflows/workflow.yml) [![Metrics (examples)](https://github.com/lowlighter/lowlighter/actions/workflows/metrics.yml/badge.svg)](https://github.com/lowlighter/lowlighter/actions/workflows/metrics.yml) -<% for (const partial of ["introduction", "features", "setup", "documentation", "license", "references"]) { -%> +<% for (const partial of ["introduction", "documentation", "license"]) { -%> <%- await include(`/partials/${partial}.md`) %> <% } %> diff --git a/.github/readme/partials/documentation.md b/.github/readme/partials/documentation.md index 971076f2..cb6af72b 100644 --- a/.github/readme/partials/documentation.md +++ b/.github/readme/partials/documentation.md @@ -1,5 +1,9 @@ # 📚 Documentation -<% for (const partial of ["compatibility", "templates", "plugins", "organizations", "contributing"]) { %> +<% if (/[.]0-beta$/.test(packaged.version)) { %> +> *âš ī¸ This is the documentation of **v<%= packaged.version.replace(/[.]0-beta$/, "") %>-beta** (`@master`/`@main` branches) which includes [unreleased features](https://github.com/lowlighter/metrics/compare/latest...master). See documentation for [**v<%= (Number(packaged.version.replace(/[.]0-beta$/, ""))-0.01).toFixed(2).replace(/[.]0/, ".") %>** (`@latest` branch) here](https://github.com/lowlighter/metrics/blob/latest/README.md).* +<% } %> + +<% for (const partial of ["setup", "templates", "plugins", "contributing"]) { %> <%- await include(`/partials/documentation/${partial}.md`) -%> <% } %> diff --git a/.github/readme/partials/documentation/contributing.md b/.github/readme/partials/documentation/contributing.md index 63b2a4a1..6672b28a 100644 --- a/.github/readme/partials/documentation/contributing.md +++ b/.github/readme/partials/documentation/contributing.md @@ -1,12 +1,14 @@ -## đŸ’Ē Customizing and contributing +## đŸ’Ē Contributing -Metrics is built to be easily customizable. -Fork this repository, switch used action from `lowlighter/metrics@latest` to your fork and start coding! +If you are interested in contributing, the following resources may interest you: -See [ARCHITECTURE.md](/ARCHITECTURE.md) for more informations about how code is structured. +* [đŸ’Ē Contribution guide](/CONTRIBUTING.md) +* [đŸ§Ŧ Architecture](/ARCHITECTURE.md) +* [📜 License](/LICENSE) +* **:octocat: GitHub resources** + * [📖 GitHub GraphQL API](https://docs.github.com/en/graphql) + * [📖 GitHub GraphQL Explorer](https://docs.github.com/en/free-pro-team@latest/graphql/overview/explorer) + * [📖 GitHub Rest API](https://docs.github.com/en/rest) + * [📖 GitHub Octicons](https://github.com/primer/octicons) -To report a bug fill an [issue](https://github.com/lowlighter/metrics/issues) describing it. -To suggest new features or requesting help to setup metrics, check out [discussions](https://github.com/lowlighter/metrics/discussions). - -If you want to contribute, submit a [pull request](https://github.com/lowlighter/metrics/pulls). -Be sure to read [CONTRIBUTING.md](/CONTRIBUTING.md) for more information about this. +Use [`đŸ’Ŧ discussions`](https://github.com/lowlighter/metrics/discussions) for feedback, new features suggestions, bugs reports or to request help for installation. diff --git a/.github/readme/partials/references.md b/.github/readme/partials/documentation/inspirations.md similarity index 62% rename from .github/readme/partials/references.md rename to .github/readme/partials/documentation/inspirations.md index 6f00a3a1..a70aa115 100644 --- a/.github/readme/partials/references.md +++ b/.github/readme/partials/documentation/inspirations.md @@ -1,12 +1,4 @@ -## 📖 Useful references - -* [GitHub GraphQL API](https://docs.github.com/en/graphql) -* [GitHub GraphQL Explorer](https://docs.github.com/en/free-pro-team@latest/graphql/overview/explorer) -* [GitHub Rest API](https://docs.github.com/en/rest) -* [GitHub Octicons](https://github.com/primer/octicons) - * See [GitHub Logos and Usage](https://github.com/logos) for more information. - -### ✨ Inspirations +# ✨ Inspirations * [anuraghazra/github-readme-stats](https://github.com/anuraghazra/github-readme-stats) * [jstrieb/github-stats](https://github.com/jstrieb/github-stats) diff --git a/.github/readme/partials/documentation/organizations.md b/.github/readme/partials/documentation/organizations.md index e66d55e4..f004f199 100644 --- a/.github/readme/partials/documentation/organizations.md +++ b/.github/readme/partials/documentation/organizations.md @@ -1,19 +1,41 @@ -### đŸĻ Organizations metrics +# đŸĻ Organizations metrics While metrics targets mainly user accounts, it's possible to render metrics for organization accounts. ![Metrics (organization account)](https://github.com/lowlighter/lowlighter/blob/master/metrics.organization.svg) -
-đŸ’Ŧ Metrics for organizations (click to expand) +## đŸ’Ŧ Metrics for organizations -<%- await include(`/partials/documentation/organizations/setup.md`) -%> +Setup is the same as for user accounts, though you'll need to add `read:org` scope, **whether you're member of target organization or not**. -
+![Add read:org scope to personal token](/.github/readme/imgs/setup_token_org_read_scope.png) -
-đŸ’Ŧ Organizations memberships for user accounts (click to expand) +You'll also need to set `user` option with your organization name. -<%- await include(`/partials/documentation/organizations/memberships.md`) -%> +If you're encounting errors and your organization is using single sign-on, try to [authorize your personal token](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on). + +Most of plugins supported by user accounts will work with organization accounts, but note that rendering metrics for organizations consume way more APIs requests. + +To support private repositories, add full `repo` scope to your personal token. + +### â„šī¸ Example workflow + +```yaml +- uses: lowlighter/metrics@latest + with: + # ... other options + token: ${{ secrets.METRICS_TOKEN }} # A personal token from an user account with read:org scope + user: organization-name # Organization name +``` + +### đŸ’Ŧ Organizations memberships for user accounts + +Only public memberships can be displayed by metrics by default. +You can manage your membership visibility in the `People` tab of your organization: + +![Publish organization membership](/.github/readme/imgs/setup_public_membership_org.png) + +For organization memberships, add `read:org` scope to your personal token. + +![Add read:org scope to personal token](/.github/readme/imgs/setup_token_org_read_scope.png) -
diff --git a/.github/readme/partials/documentation/organizations/memberships.md b/.github/readme/partials/documentation/organizations/memberships.md deleted file mode 100644 index d6878079..00000000 --- a/.github/readme/partials/documentation/organizations/memberships.md +++ /dev/null @@ -1,12 +0,0 @@ - -#### đŸ’Ŧ Organizations memberships for user accounts - - -Only public memberships can be displayed by metrics by default. -You can manage your membership visibility in the `People` tab of your organization: - -![Publish organization membership](/.github/readme/imgs/setup_public_membership_org.png) - -For organization memberships, add `read:org` scope to your personal token. - -![Add read:org scope to personal token](/.github/readme/imgs/setup_token_org_read_scope.png) diff --git a/.github/readme/partials/documentation/organizations/setup.md b/.github/readme/partials/documentation/organizations/setup.md deleted file mode 100644 index 94a85fcc..00000000 --- a/.github/readme/partials/documentation/organizations/setup.md +++ /dev/null @@ -1,25 +0,0 @@ - -#### đŸ’Ŧ Metrics for organizations - - -Setup is the same as for user accounts, though you'll need to add `read:org` scope, **whether you're member of target organization or not**. - -![Add read:org scope to personal token](/.github/readme/imgs/setup_token_org_read_scope.png) - -You'll also need to set `user` option with your organization name. - -If you're encounting errors and your organization is using single sign-on, try to [authorize your personal token](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on). - -Most of plugins supported by user accounts will work with organization accounts, but note that rendering metrics for organizations consume way more APIs requests. - -To support private repositories, add full `repo` scope to your personal token. - -#### â„šī¸ Example workflow - -```yaml -- uses: lowlighter/metrics@latest - with: - # ... other options - token: ${{ secrets.METRICS_TOKEN }} # A personal token from an user account with read:org scope - user: organization-name # Organization name -``` \ No newline at end of file diff --git a/.github/readme/partials/documentation/plugins.md b/.github/readme/partials/documentation/plugins.md index c7ae7285..328eed39 100644 --- a/.github/readme/partials/documentation/plugins.md +++ b/.github/readme/partials/documentation/plugins.md @@ -1,19 +1,15 @@ ## 🧩 Plugins -Plugins are features which provide additional content and lets you customize your rendered metrics. -See their respective documentation for more informations about how to setup them. +Plugins provide additional content and lets you customize your rendered metrics. -The following plugins are maintained by Metric's core team: +* **đŸ“Ļ Maintained by core team** <% { let previous = null; for (const [plugin, {name, category, authors = []}] of Object.entries(plugins).filter(([key, value]) => (value)&&(value.category !== "community")).sort(([an, a], [bn, b]) => a.category === b.category ? an.localeCompare(bn) : 0)) { %> <% if (previous !== category) { previous = category -%> -* **<%= `${category.charAt(0).toLocaleUpperCase()}${category.substring(1)}` %>** + * **<%= `${category.charAt(0).toLocaleUpperCase()}${category.substring(1)}` %>** <% } -%> - * [<%- name %>](/source/plugins/<%= plugin %>/README.md)<%# -%> + * [<%- name %>](/source/plugins/<%= plugin %>/README.md)<%# -%> <% }} %> - -### 🎲 Community plugins - -The following plugins are provided and maintained by Metrics's user community: +* **🎲 Maintained by community** <% { let previous = null; for (const [plugin, {name, category, authors = []}] 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 %>](/source/plugins/<%= plugin %>/README.md) by <%- authors.map(author => `[@${author}](https://github.com/${author})`).join(" ") %> <% }} %> \ No newline at end of file diff --git a/.github/readme/partials/documentation/setup.md b/.github/readme/partials/documentation/setup.md new file mode 100644 index 00000000..9616f891 --- /dev/null +++ b/.github/readme/partials/documentation/setup.md @@ -0,0 +1,19 @@ +## đŸĻŽ Setup + +There are several ways to setup metrics, each having its advantages and disadvantages: + +* [âš™ī¸ Using GitHub Action on a profile repository *(~10 min)*](/.github/readme/partials/setup/action.md) + * âœ”ī¸ All features + * âœ”ī¸ High availability (no downtimes) + * ➖ Configuration can be a bit time-consuming +* [💕 Using the shared instance *(~1 min)*](/.github/readme/partials/setup/shared.md) + * âœ”ī¸ Easily configurable and previewable + * ➖ Limited features *(compute-intensive features are disabled)* +* đŸŗ Using command line with docker *(~5 min)* *(documentation not available yet)* + * âœ”ī¸ Suited for one-time rendering +* [đŸ—ī¸ Deploying your own web instance *(~20 min)*](/.github/readme/partials/setup/web.md) + * ➖ Mostly intended for development, or to create another shared instance + +Additional resources for setup: +* [đŸĻ Configuring metrics for organizations](/.github/readme/partials/organizations.md) +* [🧰 Template/Plugin compatibility matrix](/.github/readme/partials/compatibility.md) \ No newline at end of file diff --git a/.github/readme/partials/setup/action/setup.md b/.github/readme/partials/documentation/setup/action.md similarity index 87% rename from .github/readme/partials/setup/action/setup.md rename to .github/readme/partials/documentation/setup/action.md index afce99cd..e17ef1de 100644 --- a/.github/readme/partials/setup/action/setup.md +++ b/.github/readme/partials/documentation/setup/action.md @@ -1,8 +1,19 @@ - -#### đŸ’Ŧ How to setup? - +# âš™ī¸ Using GitHub Action on a profile repository (~10 min setup) -### 0. Setup your personal repository +Setup a GitHub Action which runs periodically and pushes generated images to a repository. + +Assuming your username is `my-github-user`, you can then embed rendered metrics in your readme like below: + +```markdown + +![Metrics](https://github.com/my-github-user/my-github-user/blob/master/github-metrics.svg) + +![Metrics](https://github.com/my-github-user/my-github-user/blob/main/github-metrics.svg) +``` + +## đŸ’Ŧ How to setup? + +### 0. Setup a personal repository Create a repository with the same name as your GitHub login (if it's not already done). diff --git a/.github/readme/partials/setup/shared/usage.md b/.github/readme/partials/documentation/setup/shared.md similarity index 54% rename from .github/readme/partials/setup/shared/usage.md rename to .github/readme/partials/documentation/setup/shared.md index 4e54d5a4..3d960947 100644 --- a/.github/readme/partials/setup/shared/usage.md +++ b/.github/readme/partials/documentation/setup/shared.md @@ -1,6 +1,13 @@ - -#### đŸ’Ŧ Fair use - +# 💕 Using the shared instance (~1 min setup, but with limitations) + +For convenience, you can use the shared instance available at [metrics.lecoq.io](https://metrics.lecoq.io) without any additional setup. + +```markdown +![Metrics](https://metrics.lecoq.io/my-github-user) +``` + +This is mostly intended for previews, to enjoy all features consider using GitHub Action instead. +Availability is not guaranteed. To ensure service availability, shared instance has a few limitations: * Images are cached for 1 hour @@ -9,4 +16,4 @@ To ensure service availability, shared instance has a few limitations: * A rate limiter is enabled to prevent denial of service (it doesn't affect already cached metrics) * Some plugins may not be available -Service is provided free of charge, so please be gentle with it 🙂 \ No newline at end of file +Service is provided free of charge, so please be gentle with it 🙂 diff --git a/.github/readme/partials/setup/web/setup.md b/.github/readme/partials/documentation/setup/web.md similarity index 70% rename from .github/readme/partials/setup/web/setup.md rename to .github/readme/partials/documentation/setup/web.md index b41e2f0c..aca4d9be 100644 --- a/.github/readme/partials/setup/web/setup.md +++ b/.github/readme/partials/documentation/setup/web.md @@ -1,6 +1,15 @@ - -#### đŸ’Ŧ How to setup? - +# đŸ—ī¸ Deploying your own web instance (~20 min setup, depending on your sysadmin knowledge) + +Setup a metrics instance on your server if you don't want to use GitHub Actions and [metrics.lecoq.io](https://metrics.lecoq.io). +See all supported options in [settings.example.json](/settings.example.json). + +Assuming your username is `my-github-user`, you can then embed rendered metrics in your readme like below: + +```markdown +![Metrics](https://my-personal-domain.com/my-github-user) +``` + +## đŸ’Ŧ How to setup? ### 0. Prepare your server @@ -112,3 +121,22 @@ npm start ``` You should now be able to access your server with provided port in `setting.json` from your browser. + +## 🔗 HTTP parameters + +Most of options from [action.yml](/action.yml) are actually supported by web instance, though syntax is slightly different. +All underscores (`_`) must be replaced by dots (`.`) and `plugin_` prefixes must be dropped. + +For example, to configure pagespeed plugin you'd use the following: +``` +https://my-personal-domain.com/my-github-user?pagespeed=1&pagespeed.detailed=1&pagespeed.url=https%3A%2F%2Fexample.com +``` + +Note that url parameters must be [encoded](https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Objets_globaux/encodeURIComponent). + +As for `base` content, which is enabled by default, sections are available through "`base.
`". + +For example, to display only `repositories` section, use: +``` +https://my-personal-domain.com/my-github-user?base=0&base.repositories=1 +``` diff --git a/.github/readme/partials/documentation/templates.md b/.github/readme/partials/documentation/templates.md index e8f81d5e..981517b1 100644 --- a/.github/readme/partials/documentation/templates.md +++ b/.github/readme/partials/documentation/templates.md @@ -1,7 +1,7 @@ ## đŸ–ŧī¸ Templates Templates lets you change general appearance of rendered metrics. -See their respective documentation for more informations about how to setup them: + <% for (const [template, {name}] of Object.entries(templates).filter(([key, value]) => value)) { %> * [<%- name %>](/source/templates/<%= template %>/README.md)<%# -%> <% } %> diff --git a/.github/readme/partials/features.md b/.github/readme/partials/features.md deleted file mode 100644 index 417d64aa..00000000 --- a/.github/readme/partials/features.md +++ /dev/null @@ -1,35 +0,0 @@ -## đŸĻ‘ Interested to get your own? - -For a fully-featured experience you should use **metrics** as a [GitHub Action](https://github.com/marketplace/actions/metrics-embed), but you can also try it now at [metrics.lecoq.io](https://metrics.lecoq.io/) with your GitHub username! - -Choose `📊 Metrics embed` if you want to customize your GitHub profile and `✨ Metrics insights` to get a quick overview of your GitHub statistics: - - - - - - - - - - -
📊 Metrics embed✨ Metrics insights
- Embed metrics images on your profile readme or blog!
- Use GitHub actions for even more features!
- -
- Share your metrics with friends and on social medias!
- No configuration needed!
- -
- -### 🐙 Features - -* Create infographics from **<%= Object.entries(plugins).filter(([key, value]) => (value)&&(!["base", "core"].includes(key))).length %> plugins**, **<%= Object.entries(templates).filter(([key, value]) => (value)&&(!["community"].includes(key))).length %> templates** and **<%= Object.entries(descriptor.inputs).length %> options** - * Even more **customization** with [community templates](source/templates/community) or by [forking this repository](https://github.com/lowlighter/metrics/network/members) and editing HTML/CSS/EJS -* Support **users**, **organizations** and even **repositories** -* Transparent by default so it'll blend well whether light or dark mode is used -* Save your metrics as **images** (SVG, PNG or JPEG), **markdown**, **PDF** or **JSON** - * Upload them to GitHub through commits, pull requests and gists, or handle renders yourself -* Works either as [GitHub action](https://github.com/marketplace/actions/metrics-embed) or as [web instance](https://metrics.lecoq.io) - diff --git a/.github/readme/partials/introduction.md b/.github/readme/partials/introduction.md index 23918ba4..c4f8266c 100644 --- a/.github/readme/partials/introduction.md +++ b/.github/readme/partials/introduction.md @@ -1,8 +1,4 @@ -Generate your metrics that you can embed everywhere, including your GitHub profile readme! It works for both user and organization accounts, and even for repositories! - -<% if (/[.]0-beta$/.test(packaged.version)) { %> -> *âš ī¸ This is the documentation of **v<%= packaged.version.replace(/[.]0-beta$/, "") %>-beta** (`@master` branch) which includes [unreleased features](https://github.com/lowlighter/metrics/compare/latest...master), see documentation of [**v<%= (Number(packaged.version.replace(/[.]0-beta$/, ""))-0.01).toFixed(2).replace(/[.]0/, ".") %>** (`@latest` branch) here](https://github.com/lowlighter/metrics/blob/latest/README.md).* -<% } %> +Generate metrics that can be embedded everywhere, including your GitHub profile readme! For users, organizations, and even repositories! @@ -12,18 +8,13 @@ Generate your metrics that you can embed everywhere, including your GitHub profi <%- plugins.base.readme.demo?.replace(/ -
<% { let cell = 0 const elements = Object.entries(plugins).filter(([key, value]) => (value)&&(!["base", "core"].includes(key)&&(value.category !== "community"))) -%> - -And you can customize these heavily with plugins, templates and hundreds of options! - - +-%> <% if (elements.length%2) @@ -48,19 +39,17 @@ And you can customize these heavily with plugins, templates and hundreds of opti <% }}} -%> -
- 🧩 <%= elements.length %>+ plugins + 🧩 Customizable with <%= Object.entries(plugins).filter(([key, value]) => (value)&&(!["base", "core"].includes(key))).length %> plugins and <%= Object.entries(descriptor.inputs).length %> options!
- 🎲 Community plugins + 🎲 See also community plugins
<% } %> <% { let cell = 0 const elements = Object.entries(templates).filter(([key, value]) => (value)&&(!["community"].includes(key))) -%> - +-%> <% if (elements.length%2) @@ -71,7 +60,7 @@ And you can customize these heavily with plugins, templates and hundreds of opti if (cell === "even") { -%> -<% } %> +<% } %> <% if (cell === "odd") { -%> <% }} @@ -84,10 +73,32 @@ And you can customize these heavily with plugins, templates and hundreds of opti -%> <% }}} -%> - + - <%- templates.community.readme.demo %> + + + + + + + + + + + +
- đŸ–ŧī¸ <%= elements.length %>+ templates + đŸ–ŧī¸ And even more with <%= elements.length %>+ templates!
<%- name -%><%- name -%>
<%= templates.community.name -%>📕 See also community templates

đŸĻ‘ Try it now!

📊 Metrics embed✨ Metrics insights
+ Embed metrics images on your profile or blog!
+ Use GitHub actions for even more features!
+ +
+ Share your metrics with friends and on social medias!
+ No configuration needed!
+ +
+ Power user?
+ Fork this repository and edit HTML, CSS, JS and for even more customization! +
<% } %> diff --git a/.github/readme/partials/license.md b/.github/readme/partials/license.md index 59fa53e1..06315272 100644 --- a/.github/readme/partials/license.md +++ b/.github/readme/partials/license.md @@ -5,12 +5,5 @@ MIT License Copyright (c) 2020-present lowlighter ``` -![License details](https://github.com/lowlighter/lowlighter/blob/master/metrics.licenses.svg) - -See full license in [LICENSE.md](/LICENSE.md) - ![Sponsors](https://github.com/lowlighter/lowlighter/blob/master/metrics.sponsors.svg) - ![Contributors](https://github.com/lowlighter/lowlighter/blob/master/metrics.contributors.svg) - -[`â™Ĩī¸ Become a sponsor`](https://github.com/sponsors/lowlighter) diff --git a/.github/readme/partials/setup.md b/.github/readme/partials/setup.md deleted file mode 100644 index 1316579a..00000000 --- a/.github/readme/partials/setup.md +++ /dev/null @@ -1,5 +0,0 @@ -# 📜 How to use? - -<% for (const partial of ["action", "shared", "web"]) { -%> -<%- await include(`/partials/setup/${partial}.md`) %> -<% } %> diff --git a/.github/readme/partials/setup/action.md b/.github/readme/partials/setup/action.md deleted file mode 100644 index 9894516f..00000000 --- a/.github/readme/partials/setup/action.md +++ /dev/null @@ -1,20 +0,0 @@ -## âš™ī¸ Using GitHub Action on your profile repository (~5 min setup) - -Setup a GitHub Action which runs periodically and pushes your generated metrics image to your repository. -See all supported options in [action.yml](/action.yml). - -Assuming your username is `my-github-user`, you can then embed rendered metrics in your readme like below: - -```markdown - -![Metrics](https://github.com/my-github-user/my-github-user/blob/master/github-metrics.svg) - -![Metrics](https://github.com/my-github-user/my-github-user/blob/main/github-metrics.svg) -``` - -
-đŸ’Ŧ How to setup? (click to expand) - -<%- await include(`/partials/setup/action/setup.md`) -%> - -
diff --git a/.github/readme/partials/setup/shared.md b/.github/readme/partials/setup/shared.md deleted file mode 100644 index b40e07ca..00000000 --- a/.github/readme/partials/setup/shared.md +++ /dev/null @@ -1,17 +0,0 @@ -## 💕 Using the shared instance (~1 min setup, but with limitations) - -For convenience, you can use the shared instance available at [metrics.lecoq.io](https://metrics.lecoq.io) without any additional setup. - -```markdown -![Metrics](https://metrics.lecoq.io/my-github-user) -``` - -This is mostly intended for previews, to enjoy all features consider using GitHub Action instead. -Availability is not guaranteed. - -
-đŸ’Ŧ Fair use (click to expand) - -<%- await include(`/partials/setup/shared/usage.md`) -%> - -
diff --git a/.github/readme/partials/setup/web.md b/.github/readme/partials/setup/web.md deleted file mode 100644 index 7e711783..00000000 --- a/.github/readme/partials/setup/web.md +++ /dev/null @@ -1,25 +0,0 @@ -## đŸ—ī¸ Deploying your own web instance (~15 min setup, depending on your sysadmin knowledge) - - -Setup a metrics instance on your server if you don't want to use GitHub Actions and [metrics.lecoq.io](https://metrics.lecoq.io). -See all supported options in [settings.example.json](/settings.example.json). - -Assuming your username is `my-github-user`, you can then embed rendered metrics in your readme like below: - -```markdown -![Metrics](https://my-personal-domain.com/my-github-user) -``` - -
-đŸ’Ŧ How to setup? (click to expand) - -<%- await include(`/partials/setup/web/setup.md`) -%> - -
- -
-🔗 HTTP parameters (click to expand) - -<%- await include(`/partials/setup/web/http.md`) -%> - -
diff --git a/.github/readme/partials/setup/web/http.md b/.github/readme/partials/setup/web/http.md deleted file mode 100644 index 65f384df..00000000 --- a/.github/readme/partials/setup/web/http.md +++ /dev/null @@ -1,20 +0,0 @@ - -#### 🔗 HTTP parameters - - -Most of options from [action.yml](/action.yml) are actually supported by web instance, though syntax is slightly different. -All underscores (`_`) must be replaced by dots (`.`) and `plugin_` prefixes must be dropped. - -For example, to configure pagespeed plugin you'd use the following: -``` -https://my-personal-domain.com/my-github-user?pagespeed=1&pagespeed.detailed=1&pagespeed.url=https%3A%2F%2Fexample.com -``` - -Note that url parameters must be [encoded](https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Objets_globaux/encodeURIComponent). - -As for `base` content, which is enabled by default, sections are available through "`base.
`". - -For example, to display only `repositories` section, use: -``` -https://my-personal-domain.com/my-github-user?base=0&base.repositories=1 -``` \ No newline at end of file