Skip to content

Commit 6386217

Browse files
committed
2 parents f480841 + f1e8ee1 commit 6386217

File tree

1 file changed

+69
-37
lines changed

1 file changed

+69
-37
lines changed

README.md

Lines changed: 69 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@ But there's more with [plugins](https://github.com/lowlighter/metrics/tree/maste
1515
|[<img src="https://github.com/lowlighter/lowlighter/blob/master/metrics.plugin.languages.svg" alt="" width="240">](https://github.com/lowlighter/lowlighter/blob/master/metrics.plugin.languages.svg)|[<img src="https://github.com/lowlighter/lowlighter/blob/master/metrics.plugin.followup.svg" alt="" width="240">](https://github.com/lowlighter/lowlighter/blob/master/metrics.plugin.followup.svg)|[<img src="https://github.com/lowlighter/lowlighter/blob/master/metrics.plugin.habits.svg" alt="" width="240">](https://github.com/lowlighter/lowlighter/blob/master/metrics.plugin.habits.svg)|
1616
| **Repositories traffic plugin** | **Lines of code plugin** | **Recent posts plugin** |
1717
|[<img src="https://github.com/lowlighter/lowlighter/blob/master/metrics.plugin.traffic.svg" alt="" width="240">](https://github.com/lowlighter/lowlighter/blob/master/metrics.plugin.traffic.svg)|[<img src="https://github.com/lowlighter/lowlighter/blob/master/metrics.plugin.lines.svg" alt="" width="240">](https://github.com/lowlighter/lowlighter/blob/master/metrics.plugin.lines.svg)| [<img src="https://github.com/lowlighter/lowlighter/blob/master/metrics.plugin.posts.svg" alt="" width="240">](https://github.com/lowlighter/lowlighter/blob/master/metrics.plugin.posts.svg)|
18-
| **Isometric calendar plugin** | **Gists metrics plugin** | |
19-
|[<img src="https://github.com/lowlighter/lowlighter/blob/master/metrics.plugin.isocalendar.svg" alt="" width="240">](https://github.com/lowlighter/lowlighter/blob/master/metrics.plugin.isocalendar.svg)|[<img src="https://github.com/lowlighter/lowlighter/blob/master/metrics.plugin.gists.svg" alt="" width="240">](https://github.com/lowlighter/lowlighter/blob/master/metrics.plugin.gists.svg)| More to come soon ! |
18+
| **Isometric calendar plugin** | **Gists metrics plugin** | **Starred topics plugin** |
19+
|[<img src="https://github.com/lowlighter/lowlighter/blob/master/metrics.plugin.isocalendar.svg" alt="" width="240">](https://github.com/lowlighter/lowlighter/blob/master/metrics.plugin.isocalendar.svg)|[<img src="https://github.com/lowlighter/lowlighter/blob/master/metrics.plugin.gists.svg" alt="" width="240">](https://github.com/lowlighter/lowlighter/blob/master/metrics.plugin.gists.svg)|[<img src="https://github.com/lowlighter/lowlighter/blob/master/metrics.plugin.topics.svg" alt="" width="240">](https://github.com/lowlighter/lowlighter/blob/master/metrics.plugin.topics.svg)|
20+
| |
21+
| More to come soon ! |
2022

2123
| Classic template | Terminal template | |
2224
| :----------------: | :----------------: | :----------------: |
@@ -28,9 +30,9 @@ Try it now at [metrics.lecoq.io](https://metrics.lecoq.io/) with your GitHub use
2830

2931
Because some plugins required additional configuration and setup, not all of them are available at [metrics.lecoq.io](https://metrics.lecoq.io/), for a fully-featured experience, consider using this as a [GitHub Action](https://github.com/marketplace/actions/github-metrics-as-svg-image) !
3032

31-
## 📜 How to use ?
33+
# 📜 How to use ?
3234

33-
### ⚙️ Using GitHub Action on your profile repo (~5 min setup)
35+
## ⚙️ Using GitHub Action on your profile repo (~5 min setup)
3436

3537
Setup a GitHub Action which is run periodically and push a generated SVG image on your repository.
3638
See all supported options in [action.yml](https://github.com/lowlighter/metrics/blob/master/action.yml).
@@ -44,7 +46,7 @@ Assuming your username is `my-github-user`, you can then embed your metrics in y
4446
<details>
4547
<summary>💬 How to setup ?</summary>
4648

47-
#### 0. Prepare your personal repository
49+
### 0. Prepare your personal repository
4850

4951
If you don't know yet or haven't done it yet, create a repository with the same name as your GitHub username.
5052

@@ -54,7 +56,7 @@ The `README.md` of this repository will be displayed on your GitHub user profile
5456

5557
![GitHub Profile](https://github.com/lowlighter/metrics/blob/master/.github/readme/imgs/github_profile.png)
5658

57-
#### 1. Setup a GitHub token
59+
### 1. Setup a GitHub token
5860

5961
Go to `Developer settings` from your GitHub account settings and select `Personal access tokens` to create a new token.
6062

@@ -64,13 +66,13 @@ You'll need to create a token with the `public_repo` right so this GitHub Action
6466

6567
If you choose to use a bot account, you can put `public_repo` rights to the bot token and invite it as a collaborator on your personal profile repository so it has push access. This way, you can use a personnal token with no rights instead and reduce security issues.
6668

67-
#### 2. Put your GitHub token in your personal repository secrets
69+
### 2. Put your GitHub token in your personal repository secrets
6870

6971
Go to the `Settings` of your personal repository to create a new secret and paste your GitHub token here.
7072

7173
![Setup secret](https://github.com/lowlighter/metrics/blob/master/.github/readme/imgs/repo_secrets.png)
7274

73-
#### 3. Create a new GitHub Action workflow on your personal repo
75+
### 3. Create a new GitHub Action workflow on your personal repo
7476

7577
Create a new workflow from the `Actions` tab of your personal repository and paste the following :
7678

@@ -108,7 +110,7 @@ If you don't want to use a bot token, you can use the `plugin_selfskip` which wi
108110
If you're using a token with additional permissions, it is advised to fork this repository. If it ever gets compromised, you'll be safe.
109111
But don't forget to check it from time to time for new features !
110112

111-
#### 4. Embed the link into your README.md
113+
### 4. Embed the link into your README.md
112114

113115
Edit your README.md on your repository and link it your image :
114116

@@ -118,7 +120,7 @@ Edit your README.md on your repository and link it your image :
118120

119121
</details>
120122

121-
### 💕 Using the shared instance (~1 min setup, but with limitations)
123+
## 💕 Using the shared instance (~1 min setup, but with limitations)
122124

123125
For conveniency, you can use the shared instance available at [metrics.lecoq.io](https://metrics.lecoq.io) without any additional setup.
124126

@@ -143,7 +145,7 @@ If you're appreciating this project, consider using it as a GitHub Action or dep
143145

144146
</details>
145147

146-
### 🏗️ Deploying your own instance (~15 min setup, depending on your sysadmin knowledge)
148+
## 🏗️ Deploying your own instance (~15 min setup, depending on your sysadmin knowledge)
147149

148150
You can setup your own instance if you choose to not use the GitHub Action or you want to allow others users to use your instance.
149151

@@ -156,18 +158,18 @@ See all supported options in [settings.example.json](https://github.com/lowlight
156158
<details>
157159
<summary>💬 How to setup ?</summary>
158160

159-
#### 0. Prepare your server
161+
### 0. Prepare your server
160162

161163
You'll need a server where you can install and configure apps.
162164

163-
#### 1. Create a GitHub token
165+
### 1. Create a GitHub token
164166

165167
In your account settings, go to `Developer settings` and select `Personal access tokens` to create a new token.
166168
As explained above, you do not need to grant additional permissions to the token unless you want to enable additional plugins.
167169

168170
![Create a GitHub token](https://github.com/lowlighter/metrics/blob/master/.github/readme/imgs/personal_token_alt.png)
169171

170-
#### 2. Install the dependancies
172+
### 2. Install the dependancies
171173

172174
Connect to your server and ensure [NodeJS](https://nodejs.org/en/) is installed (see tested versions in the [build workflows](https://github.com/lowlighter/metrics/blob/master/.github/workflows/build.yml)).
173175

@@ -183,7 +185,7 @@ npm install --only=prod
183185
cp settings.example.json settings.json
184186
```
185187

186-
#### 3. Configure your instance
188+
### 3. Configure your instance
187189

188190
Open and edit `settings.json` to configure your instance using a text editor of your choice.
189191

@@ -197,7 +199,7 @@ Open and edit `settings.json` to configure your instance using a text editor of
197199

198200
See all supported options in [settings.example.json](https://github.com/lowlighter/metrics/blob/master/settings.example.json).
199201

200-
#### 4. Start your instance
202+
### 4. Start your instance
201203

202204
Start your instance once you've finished configuring it :
203205

@@ -207,15 +209,15 @@ npm start
207209

208210
And you should be able to access it on the port you provided !
209211

210-
#### 5. Embed the link into your README.md
212+
### 5. Embed the link into your README.md
211213

212214
Edit your `README.md` on your repository and include your metrics from your server domain :
213215

214216
```markdown
215217
![GitHub metrics](https://my-personal-domain.com/my-github-user)
216218
```
217219

218-
#### 6. (optional) Setup as service on your instance
220+
### 6. (optional) Setup as service on your instance
219221

220222
If you want to ensure that your instance will be restarted after reboots or crashes, you should setup it as a service.
221223
This is described below for linux-like systems with *systemd*.
@@ -283,9 +285,9 @@ For example, to configure `music` plugin, you could add the following to url : `
283285

284286
</details>
285287

286-
## 📚 Documentations
288+
# 📚 Documentations
287289

288-
### 🖼️ Templates
290+
## 🖼️ Templates
289291

290292
Templates allows you to style your metrics.
291293
The default is the classic one, but you can change it for something more stylish.
@@ -294,12 +296,12 @@ Some metrics may be displayed differently, and it is possible that not all plugi
294296

295297
Consider trying them at [metrics.lecoq.io](https://metrics.lecoq.io) !
296298

297-
### 🧩 Plugins
299+
## 🧩 Plugins
298300

299301
Plugins are features which are disabled by default but they can provide additional metrics.
300302
In return they may require additional configuration and tend to consume additional API requests.
301303

302-
#### 🗃️ Base content
304+
### 🗃️ Base content
303305

304306
Generated metrics contains a few sections that are enabled by default, such as recent activity, community stats and repositories stats.
305307
This can be configured by explicitely opt-out from them.
@@ -326,7 +328,7 @@ For example, to keep only `header` and `repositories` sections, add the followin
326328
327329
</details>
328330
329-
#### ⏱️ PageSpeed
331+
### ⏱️ PageSpeed
330332
331333
The *pagespeed* plugin allows you to add the performances of the website attached to the GitHub user account :
332334
@@ -353,11 +355,11 @@ Add the following to your workflow :
353355
354356
</details>
355357
356-
#### 🎼 Music
358+
### 🎼 Music
357359
358360
The *music* plugin can work in the following modes :
359361
360-
##### Playlist mode
362+
#### Playlist mode
361363
362364
Select randomly a few tracks from a given playlist so you can suggest your favorite tracks to your visitors.
363365
@@ -430,7 +432,7 @@ Once you've extracted the embed url you can finish the setup by adding the follo
430432

431433
</details>
432434

433-
##### Recently played mode
435+
#### Recently played mode
434436

435437
Display the track you played recently.
436438

@@ -522,7 +524,7 @@ Now that you've got your `client_id`, `client_secret` and `refresh_token` you ca
522524
523525
</details>
524526
525-
#### 📅 Isometric calendar
527+
### 📅 Isometric calendar
526528
527529
The *isocalendar* plugin allows you to display an isometric view of your commits calendar, along with a few stats like your current streak and your commit average per day.
528530
@@ -554,7 +556,7 @@ It is possible to extend display a full-year by adding the following instead :
554556
555557
</details>
556558
557-
#### 👨‍💻 Lines
559+
### 👨‍💻 Lines
558560
559561
The *lines* of code plugin allows you to compute the number of lines of code you added and removed across all of your repositories.
560562
@@ -575,7 +577,7 @@ Add the following to your workflow :
575577
576578
</details>
577579
578-
#### 🧮 Traffic
580+
### 🧮 Traffic
579581
580582
The repositories *traffic* plugin allows you to compute the number of pages views across your repositories.
581583
@@ -602,7 +604,7 @@ Add the following to your workflow :
602604

603605
</details>
604606

605-
#### 💡 Habits
607+
### 💡 Habits
606608

607609
The coding *habits* plugin allows you to add deduced coding about based on your recent activity, from up to 100 events.
608610

@@ -627,7 +629,7 @@ Add the following to your workflow :
627629

628630
</details>
629631

630-
#### ✒️ Posts
632+
### ✒️ Posts
631633

632634
The recent *posts* plugin allows you to display recent articles you wrote on an external source, like [dev.to](https://dev.to).
633635

@@ -650,7 +652,7 @@ Add the following to your workflow :
650652

651653
</details>
652654

653-
#### 🎟️ Follow-up
655+
### 🎟️ Follow-up
654656

655657
The *follow-up* plugin allows you to compute the ratio of opened/closed issues and the ratio of opened/merged pull requests on your repositories, which shows whether most of them are maintened or not.
656658

@@ -669,7 +671,7 @@ Add the following to your workflow :
669671

670672
</details>
671673

672-
#### 🈷️ Languages
674+
### 🈷️ Languages
673675

674676
The *languages* plugin allows you to compute which languages you use the most in your repositories.
675677

@@ -688,7 +690,7 @@ Add the following to your workflow :
688690

689691
</details>
690692

691-
#### 🎫 Gists
693+
### 🎫 Gists
692694

693695
The *gists* plugin allows you to display [gists](https://gist.github.com) metrics.
694696

@@ -709,7 +711,37 @@ Add the following to your workflow :
709711

710712
</details>
711713

712-
#### ⏭️ Selfskip
714+
### 📌 Topics *(pre-release)*
715+
716+
The *topics* plugin allows you to display your [starred topics](https://github.com/stars?filter=topics).
717+
Check out [GitHub topics](https://github.com/topics) to search interesting topics.
718+
719+
![Gists plugin](https://github.com/lowlighter/lowlighter/blob/master/metrics.plugin.topics.svg)
720+
721+
<details>
722+
<summary>💬 About</summary>
723+
724+
This uses puppeteer to navigate through your starred topics page.
725+
726+
You can choose to display and order topics by :
727+
- Most `stars`
728+
- Recent `activity`
729+
- Recently `starred` by you
730+
- `random`ly
731+
732+
Add the following to your workflow :
733+
```yaml
734+
- uses: lowlighter/metrics@latest
735+
with:
736+
# ... other options
737+
plugin_topics: yes
738+
plugin_topics_sort: stars
739+
plugin_topics_limit: 15
740+
```
741+
742+
</details>
743+
744+
### ⏭️ Selfskip
713745

714746
The *selfskip* plugin allows you to count out all commits tagged with `[Skip GitHub Action]` you authored on your personal repository from your reported commit counts.
715747

@@ -728,15 +760,15 @@ Add the following to your workflow :
728760

729761
</details>
730762

731-
### 💪 Contributing and customizing
763+
## 💪 Contributing and customizing
732764

733765
If you would like to suggest a new feature, find a bug or need help, you can fill an [issue](https://github.com/lowlighter/metrics/issues) describing your problem.
734766

735767
If you're motivated enough, you can submit a [pull request](https://github.com/lowlighter/metrics/pulls) to integrate new features or to solve open issues.
736768

737769
Read [contributing.md](https://github.com/lowlighter/metrics/blob/master/CONTRIBUTING.md) for more information about this.
738770

739-
### 📖 Useful references
771+
## 📖 Useful references
740772

741773
* [GitHub GraphQL API](https://docs.github.com/en/graphql)
742774
* [GitHub GraphQL Explorer](https://developer.github.com/v4/explorer/)

0 commit comments

Comments
 (0)