From 611347212c33ed8835f9e7ff58e217f65340dc6b Mon Sep 17 00:00:00 2001
From: lowlighter <22963968+lowlighter@users.noreply.github.com>
Date: Fri, 14 Jan 2022 22:11:17 -0500
Subject: [PATCH] docs(templates): regenerate documentation
---
.github/scripts/quickstart/template/README.md | 19 +---
source/templates/classic/README.md | 46 ++++++---
source/templates/community/README.md | 23 +++++
source/templates/markdown/README.md | 94 +++++++++++++++++--
source/templates/repository/README.md | 53 +++++++----
source/templates/terminal/README.md | 46 ++++++---
6 files changed, 212 insertions(+), 69 deletions(-)
diff --git a/.github/scripts/quickstart/template/README.md b/.github/scripts/quickstart/template/README.md
index 28ab23d4..ec2c27d6 100644
--- a/.github/scripts/quickstart/template/README.md
+++ b/.github/scripts/quickstart/template/README.md
@@ -1,18 +1,7 @@
-### đ <%= `${name.charAt(0).toLocaleUpperCase()}${name.substring(1)}` %> template
-
-
-
-
-
- |
-
+
+
#### âšī¸ Examples workflows
-```yaml
-- uses: lowlighter/metrics@latest
- with:
- # ... other options
- setup_community_templates: user/metrics@master:<%= name %>
- template: "@<%= name %>"
-```
\ No newline at end of file
+
+
\ No newline at end of file
diff --git a/source/templates/classic/README.md b/source/templates/classic/README.md
index b838d72d..4610c206 100644
--- a/source/templates/classic/README.md
+++ b/source/templates/classic/README.md
@@ -1,21 +1,37 @@
-### đ Classic template
-
-Default template, mimicking GitHub visual identity.
-
+
+
-#### âšī¸ Examples workflows
-
-[âĄī¸ Supported formats and inputs](metadata.yml)
+## âšī¸ Examples workflows
+
```yaml
-- uses: lowlighter/metrics@latest
- with:
- # ... other options
- template: classic
+name: Example
+uses: lowlighter/metrics@latest
+with:
+ filename: metrics.classic.svg
+ token: ${{ secrets.METRICS_TOKEN }}
+ base: header, repositories
+ plugin_lines: 'yes'
+
```
+
\ No newline at end of file
diff --git a/source/templates/community/README.md b/source/templates/community/README.md
index cb0b52ab..422b8347 100644
--- a/source/templates/community/README.md
+++ b/source/templates/community/README.md
@@ -60,3 +60,26 @@ Then use HTML, CSS, and [EJS](https://github.com/mde/ejs) to create something aw
Do not hesitate to share it on [GitHub discussions](https://github.com/lowlighter/metrics/discussions)!
For more information, see [contribution guide](/CONTRIBUTING.md).
+
+## âšī¸ Examples workflows
+
+
+```yaml
+name: Using a community template
+uses: lowlighter/metrics@latest
+with:
+ token: ${{ secrets.METRICS_TOKEN }}
+ template: '@classic'
+ setup_community_templates: lowlighter/metrics@master:classic
+
+```
+```yaml
+name: Using a trusted community template
+uses: lowlighter/metrics@latest
+with:
+ token: ${{ secrets.METRICS_TOKEN }}
+ template: '@terminal'
+ setup_community_templates: lowlighter/metrics@master:terminal+trust
+
+```
+
\ No newline at end of file
diff --git a/source/templates/markdown/README.md b/source/templates/markdown/README.md
index 011fb4cf..b1e9d004 100644
--- a/source/templates/markdown/README.md
+++ b/source/templates/markdown/README.md
@@ -1,13 +1,26 @@
+
+ đ Markdown template |
+ | A template capable of rendering markdown from a given template file. |
+
+ Supported features â Full specification |
+ đ° âī¸ đŧ đ đ¤ |
+
+
+ | đ¤ Users, đĨ Organizations |
+
+
+ | #ī¸âŖ JSON, đ Markdown, đ Markdown (PDF) |
+
+
+
+
+
+ |
+
+
-#### âšī¸ Examples workflows
-
-
-
-
-___
-
This template can be used to a *markdown template file* with data gathered by metrics.
Since the resulting output is a markdown file, it is possible to do additional formatting such as creating hyperlinks and adding custom texts.
@@ -116,3 +129,70 @@ The `embed()` function takes two arguments:
> đĄ The `plugin_` prefix can be dropped for convenience
> đĄ The `embed()` function does not have `đī¸ base` plugin enabled by default. To use it, it is required to explicitely pass them through `base` option.
+
+## âšī¸ Examples workflows
+
+
+```yaml
+name: Example
+uses: lowlighter/metrics@latest
+with:
+ template: markdown
+ filename: metrics.markdown.md
+ markdown: metrics.markdown.template.md
+ config_output: markdown
+ token: ${{ secrets.METRICS_TOKEN }}
+
+```
+```yaml
+name: Example with plugins configuration for embed use
+uses: lowlighter/metrics@latest
+with:
+ template: markdown
+ filename: metrics.markdown.full.md
+ markdown: >-
+ https://raw.githubusercontent.com/lowlighter/metrics/master/source/templates/markdown/example.md
+ config_output: markdown
+ plugin_activity: 'yes'
+ plugin_activity_limit: 7
+ plugin_activity_days: 0
+ plugin_activity_filter: issue, pr, release, fork, review, ref/create
+ plugin_posts: 'yes'
+ plugin_posts_source: dev.to
+ plugin_posts_descriptions: 'yes'
+ plugin_posts_covers: 'yes'
+ plugin_posts_limit: 2
+ plugin_rss: 'yes'
+ plugin_rss_source: https://news.ycombinator.com/rss
+ plugin_rss_limit: 4
+ plugin_tweets: 'yes'
+ plugin_tweets_token: ${{ secrets.TWITTER_TOKEN }}
+ plugin_tweets_user: github
+ plugin_tweets_attachments: 'yes'
+ plugin_tweets_limit: 2
+ plugin_topics: 'yes'
+ plugin_topics_limit: 24
+ plugin_isocalendar: 'yes'
+ plugin_languages: 'yes'
+ token: ${{ secrets.METRICS_TOKEN }}
+
+```
+```yaml
+name: Example (pdf output)
+uses: lowlighter/metrics@latest
+with:
+ template: markdown
+ filename: metrics.markdown.pdf
+ markdown: >-
+ https://raw.githubusercontent.com/lowlighter/metrics/master/source/templates/markdown/example.pdf.md
+ config_output: markdown-pdf
+ plugin_rss: 'yes'
+ plugin_rss_source: https://news.ycombinator.com/rss
+ plugin_rss_limit: 4
+ plugin_isocalendar: 'yes'
+ config_twemoji: 'yes'
+ config_padding: 5%
+ token: ${{ secrets.METRICS_TOKEN }}
+
+```
+
\ No newline at end of file
diff --git a/source/templates/repository/README.md b/source/templates/repository/README.md
index 3a082230..75643dc9 100644
--- a/source/templates/repository/README.md
+++ b/source/templates/repository/README.md
@@ -1,23 +1,42 @@
-### đ Repository template
-
-Template crafted for repositories, mimicking GitHub visual identity.
-
+
+
-#### âšī¸ Examples workflows
-
-[âĄī¸ Supported formats and inputs](metadata.yml)
+## âšī¸ Examples workflows
+
```yaml
-- uses: lowlighter/metrics@latest
- with:
- # ... other options
- template: classic
- user: repository-owner # Optional if you're the owner of target repository and you're using your own personal token
- repo: repository-name # Repository name
+name: Example
+uses: lowlighter/metrics@latest
+with:
+ template: repository
+ filename: metrics.repository.svg
+ token: ${{ secrets.METRICS_BOT_TOKEN }}
+ user: lowlighter
+ repo: metrics
+ plugin_lines: 'yes'
+ plugin_followup: 'yes'
+ plugin_projects: 'yes'
+ plugin_projects_repositories: lowlighter/metrics/projects/1
+
```
+
\ No newline at end of file
diff --git a/source/templates/terminal/README.md b/source/templates/terminal/README.md
index 1aff2d57..49802b8b 100644
--- a/source/templates/terminal/README.md
+++ b/source/templates/terminal/README.md
@@ -1,21 +1,37 @@
-### đ Terminal template
-
-Terminal template, mimicking a SSH session.
-
+
+
-#### âšī¸ Examples workflows
-
-[âĄī¸ Supported formats and inputs](metadata.yml)
+## âšī¸ Examples workflows
+
```yaml
-- uses: lowlighter/metrics@latest
- with:
- # ... other options
- template: terminal
+name: Example
+uses: lowlighter/metrics@latest
+with:
+ template: terminal
+ filename: metrics.terminal.svg
+ token: ${{ secrets.METRICS_TOKEN }}
+ base: header, metadata
+
```
+
\ No newline at end of file