Skip to content

Commit 6113472

Browse files
committed
docs(templates): regenerate documentation
1 parent 7228fc3 commit 6113472

File tree

6 files changed

+212
-69
lines changed

6 files changed

+212
-69
lines changed
Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,7 @@
1-
### 📕 <%= `${name.charAt(0).toLocaleUpperCase()}${name.substring(1)}` %> template
2-
3-
<table>
4-
<td align="center">
5-
<img src="">
6-
<img width="900" height="1" alt="">
7-
</td>
8-
</table>
1+
<!--header-->
2+
<!--/header-->
93

104
#### ℹ️ Examples workflows
115

12-
```yaml
13-
- uses: lowlighter/metrics@latest
14-
with:
15-
# ... other options
16-
setup_community_templates: user/metrics@master:<%= name %>
17-
template: "@<%= name %>"
18-
```
6+
<!--examples-->
7+
<!--/examples-->

source/templates/classic/README.md

Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,37 @@
1-
### 📗 Classic template
2-
3-
Default template, mimicking GitHub visual identity.
4-
1+
<!--header-->
52
<table>
6-
<td align="center">
7-
<img src="https://github.com/lowlighter/lowlighter/blob/master/metrics.classic.svg">
8-
<img width="900" height="1" alt="">
9-
</td>
3+
<tr><th colspan="2"><h3>📗 Classic template</h3></th></tr>
4+
<tr><td colspan="2" align="center">A template mimicking GitHub visual identity.<br>This is also the default template.<br></td></tr>
5+
<tr>
6+
<th rowspan="3">Supported features<br><sub><a href="metadata.yml">→ Full specification</a></sub></th>
7+
<td><a href="/source/plugins/achievements" title="🏆 Achievements">🏆</a> <a href="/source/plugins/activity" title="📰 Recent activity">📰</a> <a href="/source/plugins/anilist" title="🌸 Anilist watch list and reading list">🌸</a> <a href="/source/plugins/code" title="♐ Code snippet of the day">♐</a> <a href="/source/plugins/discussions" title="💬 Discussions">💬</a> <a href="/source/plugins/followup" title="🎟️ Follow-up of issues and pull requests">🎟️</a> <a href="/source/plugins/gists" title="🎫 Gists">🎫</a> <a href="/source/plugins/habits" title="💡 Coding habits">💡</a> <a href="/source/plugins/introduction" title="🙋 Introduction">🙋</a> <a href="/source/plugins/isocalendar" title="📅 Isometric commit calendar">📅</a> <a href="/source/plugins/languages" title="🈷️ Most used languages">🈷️</a> <a href="/source/plugins/lines" title="👨‍💻 Lines of code changed">👨‍💻</a> <a href="/source/plugins/music" title="🎼 Music plugin">🎼</a> <a href="/source/plugins/nightscout" title="💉 Nightscout">💉</a> <a href="/source/plugins/notable" title="🎩 Notable contributions">🎩</a> <a href="/source/plugins/pagespeed" title="⏱️ Website performances">⏱️</a> <a href="/source/plugins/people" title="🧑‍🤝‍🧑 People plugin">🧑‍🤝‍🧑</a> <a href="/source/plugins/poopmap" title="💩 PoopMap plugin">💩</a> <a href="/source/plugins/posts" title="✒️ Recent posts">✒️</a> <a href="/source/plugins/projects" title="🗂️ Active projects">🗂️</a> <a href="/source/plugins/reactions" title="🎭 Comment reactions">🎭</a> <a href="/source/plugins/repositories" title="📓 Repositories">📓</a> <a href="/source/plugins/rss" title="🗼 Rss feed">🗼</a> <a href="/source/plugins/screenshot" title="📸 Website screenshot">📸</a> <a href="/source/plugins/skyline" title="🌇 GitHub Skyline 3D calendar">🌇</a> <a href="/source/plugins/sponsors" title="💕 GitHub Sponsors">💕</a> <a href="/source/plugins/stackoverflow" title="🗨️ Stackoverflow plugin">🗨️</a> <a href="/source/plugins/stargazers" title="✨ Stargazers over last weeks">✨</a> <a href="/source/plugins/starlists" title="💫 Starlists">💫</a> <a href="/source/plugins/stars" title="🌟 Recently starred repositories">🌟</a> <a href="/source/plugins/stock" title="💹 Stock prices">💹</a> <a href="/source/plugins/support" title="💭 GitHub Community Support">💭</a> <a href="/source/plugins/topics" title="📌 Starred topics">📌</a> <a href="/source/plugins/traffic" title="🧮 Repositories traffic">🧮</a> <a href="/source/plugins/tweets" title="🐤 Latest tweets">🐤</a> <a href="/source/plugins/wakatime" title="⏰ WakaTime plugin">⏰</a></td>
8+
</tr>
9+
<tr>
10+
<td>👤 Users, 👥 Organizations</td>
11+
</tr>
12+
<tr>
13+
<td>*️⃣ SVG, *️⃣ PNG, *️⃣ JPEG, #️⃣ JSON</td>
14+
</tr>
15+
<tr>
16+
<td colspan="2" align="center">
17+
<img src="https://github.com/lowlighter/lowlighter/blob/master/metrics.classic.svg" alt=""></img>
18+
<img width="900" height="1" alt="">
19+
</td>
20+
</tr>
1021
</table>
22+
<!--/header-->
1123

12-
#### ℹ️ Examples workflows
13-
14-
[➡️ Supported formats and inputs](metadata.yml)
24+
## ℹ️ Examples workflows
1525

26+
<!--examples-->
1627
```yaml
17-
- uses: lowlighter/metrics@latest
18-
with:
19-
# ... other options
20-
template: classic
28+
name: Example
29+
uses: lowlighter/metrics@latest
30+
with:
31+
filename: metrics.classic.svg
32+
token: ${{ secrets.METRICS_TOKEN }}
33+
base: header, repositories
34+
plugin_lines: 'yes'
35+
2136
```
37+
<!--/examples-->

source/templates/community/README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,26 @@ Then use HTML, CSS, and [EJS](https://github.com/mde/ejs) to create something aw
6060
Do not hesitate to share it on [GitHub discussions](https://github.com/lowlighter/metrics/discussions)!
6161

6262
For more information, see [contribution guide](/CONTRIBUTING.md).
63+
64+
## ℹ️ Examples workflows
65+
66+
<!--examples-->
67+
```yaml
68+
name: Using a community template
69+
uses: lowlighter/metrics@latest
70+
with:
71+
token: ${{ secrets.METRICS_TOKEN }}
72+
template: '@classic'
73+
setup_community_templates: lowlighter/metrics@master:classic
74+
75+
```
76+
```yaml
77+
name: Using a trusted community template
78+
uses: lowlighter/metrics@latest
79+
with:
80+
token: ${{ secrets.METRICS_TOKEN }}
81+
template: '@terminal'
82+
setup_community_templates: lowlighter/metrics@master:terminal+trust
83+
84+
```
85+
<!--/examples-->

source/templates/markdown/README.md

Lines changed: 87 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,26 @@
11
<!--header-->
2+
<table>
3+
<tr><th colspan="2"><h3>📒 Markdown template</h3></th></tr>
4+
<tr><td colspan="2" align="center">A template capable of rendering markdown from a given template file.</td></tr>
5+
<tr>
6+
<th rowspan="3">Supported features<br><sub><a href="metadata.yml">→ Full specification</a></sub></th>
7+
<td><a href="/source/plugins/activity" title="📰 Recent activity">📰</a> <a href="/source/plugins/posts" title="✒️ Recent posts">✒️</a> <a href="/source/plugins/rss" title="🗼 Rss feed">🗼</a> <a href="/source/plugins/topics" title="📌 Starred topics">📌</a> <a href="/source/plugins/tweets" title="🐤 Latest tweets">🐤</a></td>
8+
</tr>
9+
<tr>
10+
<td>👤 Users, 👥 Organizations</td>
11+
</tr>
12+
<tr>
13+
<td>#️⃣ JSON, 🔠 Markdown, 🔠 Markdown (PDF)</td>
14+
</tr>
15+
<tr>
16+
<td colspan="2" align="center">
17+
<img src="https://github.com/lowlighter/lowlighter/blob/master/metrics.markdown.png" alt=""></img>
18+
<img width="900" height="1" alt="">
19+
</td>
20+
</tr>
21+
</table>
222
<!--/header-->
323

4-
#### ℹ️ Examples workflows
5-
6-
<!--examples-->
7-
<!--/examples-->
8-
9-
___
10-
1124
This template can be used to a *markdown template file* with data gathered by metrics.
1225

1326
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:
116129
> 💡 The `plugin_` prefix can be dropped for convenience
117130

118131
> 💡 The `embed()` function does not have `🗃️ base` plugin enabled by default. To use it, it is required to explicitely pass them through `base` option.
132+
133+
## ℹ️ Examples workflows
134+
135+
<!--examples-->
136+
```yaml
137+
name: Example
138+
uses: lowlighter/metrics@latest
139+
with:
140+
template: markdown
141+
filename: metrics.markdown.md
142+
markdown: metrics.markdown.template.md
143+
config_output: markdown
144+
token: ${{ secrets.METRICS_TOKEN }}
145+
146+
```
147+
```yaml
148+
name: Example with plugins configuration for embed use
149+
uses: lowlighter/metrics@latest
150+
with:
151+
template: markdown
152+
filename: metrics.markdown.full.md
153+
markdown: >-
154+
https://raw.githubusercontent.com/lowlighter/metrics/master/source/templates/markdown/example.md
155+
config_output: markdown
156+
plugin_activity: 'yes'
157+
plugin_activity_limit: 7
158+
plugin_activity_days: 0
159+
plugin_activity_filter: issue, pr, release, fork, review, ref/create
160+
plugin_posts: 'yes'
161+
plugin_posts_source: dev.to
162+
plugin_posts_descriptions: 'yes'
163+
plugin_posts_covers: 'yes'
164+
plugin_posts_limit: 2
165+
plugin_rss: 'yes'
166+
plugin_rss_source: https://news.ycombinator.com/rss
167+
plugin_rss_limit: 4
168+
plugin_tweets: 'yes'
169+
plugin_tweets_token: ${{ secrets.TWITTER_TOKEN }}
170+
plugin_tweets_user: github
171+
plugin_tweets_attachments: 'yes'
172+
plugin_tweets_limit: 2
173+
plugin_topics: 'yes'
174+
plugin_topics_limit: 24
175+
plugin_isocalendar: 'yes'
176+
plugin_languages: 'yes'
177+
token: ${{ secrets.METRICS_TOKEN }}
178+
179+
```
180+
```yaml
181+
name: Example (pdf output)
182+
uses: lowlighter/metrics@latest
183+
with:
184+
template: markdown
185+
filename: metrics.markdown.pdf
186+
markdown: >-
187+
https://raw.githubusercontent.com/lowlighter/metrics/master/source/templates/markdown/example.pdf.md
188+
config_output: markdown-pdf
189+
plugin_rss: 'yes'
190+
plugin_rss_source: https://news.ycombinator.com/rss
191+
plugin_rss_limit: 4
192+
plugin_isocalendar: 'yes'
193+
config_twemoji: 'yes'
194+
config_padding: 5%
195+
token: ${{ secrets.METRICS_TOKEN }}
196+
197+
```
198+
<!--/examples-->
Lines changed: 36 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,42 @@
1-
### 📘 Repository template
2-
3-
Template crafted for repositories, mimicking GitHub visual identity.
4-
1+
<!--header-->
52
<table>
6-
<td align="center">
7-
<img src="https://github.com/lowlighter/lowlighter/blob/master/metrics.repository.svg">
8-
<img width="900" height="1" alt="">
9-
</td>
3+
<tr><th colspan="2"><h3>📘 Repository template</h3></th></tr>
4+
<tr><td colspan="2" align="center">A template mimicking GitHub visual identity and specially crafted for repositories.</td></tr>
5+
<tr>
6+
<th rowspan="3">Supported features<br><sub><a href="metadata.yml">→ Full specification</a></sub></th>
7+
<td><a href="/source/plugins/activity" title="📰 Recent activity">📰</a> <a href="/source/plugins/contributors" title="🏅 Repository contributors">🏅</a> <a href="/source/plugins/followup" title="🎟️ Follow-up of issues and pull requests">🎟️</a> <a href="/source/plugins/introduction" title="🙋 Introduction">🙋</a> <a href="/source/plugins/languages" title="🈷️ Most used languages">🈷️</a> <a href="/source/plugins/licenses" title="📜 Repository licenses">📜</a> <a href="/source/plugins/lines" title="👨‍💻 Lines of code changed">👨‍💻</a> <a href="/source/plugins/pagespeed" title="⏱️ Website performances">⏱️</a> <a href="/source/plugins/people" title="🧑‍🤝‍🧑 People plugin">🧑‍🤝‍🧑</a> <a href="/source/plugins/posts" title="✒️ Recent posts">✒️</a> <a href="/source/plugins/projects" title="🗂️ Active projects">🗂️</a> <a href="/source/plugins/rss" title="🗼 Rss feed">🗼</a> <a href="/source/plugins/screenshot" title="📸 Website screenshot">📸</a> <a href="/source/plugins/sponsors" title="💕 GitHub Sponsors">💕</a> <a href="/source/plugins/stargazers" title="✨ Stargazers over last weeks">✨</a> <a href="/source/plugins/stock" title="💹 Stock prices">💹</a> <a href="/source/plugins/traffic" title="🧮 Repositories traffic">🧮</a></td>
8+
</tr>
9+
<tr>
10+
<td>📓 Repositories</td>
11+
</tr>
12+
<tr>
13+
<td>*️⃣ SVG, *️⃣ PNG, *️⃣ JPEG, #️⃣ JSON</td>
14+
</tr>
15+
<tr>
16+
<td colspan="2" align="center">
17+
<img src="https://github.com/lowlighter/lowlighter/blob/master/metrics.repository.svg" alt=""></img>
18+
<img width="900" height="1" alt="">
19+
</td>
20+
</tr>
1021
</table>
22+
<!--/header-->
1123

12-
#### ℹ️ Examples workflows
13-
14-
[➡️ Supported formats and inputs](metadata.yml)
24+
## ℹ️ Examples workflows
1525

26+
<!--examples-->
1627
```yaml
17-
- uses: lowlighter/metrics@latest
18-
with:
19-
# ... other options
20-
template: classic
21-
user: repository-owner # Optional if you're the owner of target repository and you're using your own personal token
22-
repo: repository-name # Repository name
28+
name: Example
29+
uses: lowlighter/metrics@latest
30+
with:
31+
template: repository
32+
filename: metrics.repository.svg
33+
token: ${{ secrets.METRICS_BOT_TOKEN }}
34+
user: lowlighter
35+
repo: metrics
36+
plugin_lines: 'yes'
37+
plugin_followup: 'yes'
38+
plugin_projects: 'yes'
39+
plugin_projects_repositories: lowlighter/metrics/projects/1
40+
2341
```
42+
<!--/examples-->
Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,37 @@
1-
### 📙 Terminal template
2-
3-
Terminal template, mimicking a SSH session.
4-
1+
<!--header-->
52
<table>
6-
<td align="center">
7-
<img src="https://github.com/lowlighter/lowlighter/blob/master/metrics.terminal.svg">
8-
<img width="900" height="1" alt="">
9-
</td>
3+
<tr><th colspan="2"><h3>📙 Terminal template</h3></th></tr>
4+
<tr><td colspan="2" align="center">A template mimicking a SSH session.</td></tr>
5+
<tr>
6+
<th rowspan="3">Supported features<br><sub><a href="metadata.yml">→ Full specification</a></sub></th>
7+
<td><a href="/source/plugins/gists" title="🎫 Gists">🎫</a> <a href="/source/plugins/isocalendar" title="📅 Isometric commit calendar">📅</a> <a href="/source/plugins/languages" title="🈷️ Most used languages">🈷️</a> <a href="/source/plugins/lines" title="👨‍💻 Lines of code changed">👨‍💻</a> <a href="/source/plugins/pagespeed" title="⏱️ Website performances">⏱️</a> <a href="/source/plugins/screenshot" title="📸 Website screenshot">📸</a> <a href="/source/plugins/traffic" title="🧮 Repositories traffic">🧮</a></td>
8+
</tr>
9+
<tr>
10+
<td>👤 Users, 👥 Organizations</td>
11+
</tr>
12+
<tr>
13+
<td>*️⃣ SVG, *️⃣ PNG, *️⃣ JPEG, #️⃣ JSON</td>
14+
</tr>
15+
<tr>
16+
<td colspan="2" align="center">
17+
<img src="https://github.com/lowlighter/lowlighter/blob/master/metrics.terminal.svg" alt=""></img>
18+
<img width="900" height="1" alt="">
19+
</td>
20+
</tr>
1021
</table>
22+
<!--/header-->
1123

12-
#### ℹ️ Examples workflows
13-
14-
[➡️ Supported formats and inputs](metadata.yml)
24+
## ℹ️ Examples workflows
1525

26+
<!--examples-->
1627
```yaml
17-
- uses: lowlighter/metrics@latest
18-
with:
19-
# ... other options
20-
template: terminal
28+
name: Example
29+
uses: lowlighter/metrics@latest
30+
with:
31+
template: terminal
32+
filename: metrics.terminal.svg
33+
token: ${{ secrets.METRICS_TOKEN }}
34+
base: header, metadata
35+
2136
```
37+
<!--/examples-->

0 commit comments

Comments
 (0)