Note
Don't forget to replace example YOUR-USERNAME
parameter with real value.
- Go to https://views.igorkowalczyk.dev and enter your Github username or any other text
- Copy the generated markdown code with the style you like and paste it in your
README.md
file
![Github Views](https://views.igorkowalczyk.dev/api/badge/YOUR-USERNAME)
Note
The default style is flat
Style | Example | Usage |
---|---|---|
flat |
style=flat |
|
classic |
style=classic |
Note
To apply the style, add to the URL ?style=YOUR-STYLE
, if you use other parameters you can use &style=YOUR-STYLE
Note
The default color is blue
Note
To apply the style, add to the URL ?color=YOUR-COLOR
, if you use other parameters you can use &color=YOUR-COLOR
Warning
HEX colors should be used without #
symbol prefix.
You can display the number of views in a more readable format. You can choose between short
and long
format.
Format | Example | Usage |
---|---|---|
short |
format=short |
|
long |
format=long |
Note
To apply the style, add to the URL ?format=YOUR-FORMAT
, if you use other parameters you can use &format=YOUR-FORMAT
You can overwrite default Views
text with your own label.
![Github Views](https://views.igorkowalczyk.dev/api/badge/YOUR-USERNAME?label=Your+own+label)
Note
Replace whitespace with +
character in multi-word labels.
You can get the number of views in json
format. It can be useful if you want to use the number of views in your application.
Warning
The API is read-only, you can't change the number of views.
Request:
https://views.igorkowalczyk.dev/api/json/YOUR-USERNAME
Note
Replace YOUR-USERNAME
with your real value.
Response:
{ "views": 123 }
- Clone this repository
git clone https://github.com/IgorKowalczyk/github-views.git
- Run
pnpm i
to install all dependencies, - Run
npm run build
to build the project ornpm run dev
to run the project in development mode. - Run
pnpm run preview
to preview the project.
- Fork this repository on GitHub
- Go to https://deno.com/deploy and create an account
- Click "New Project" and select your account and forked repository
- Click "Add build step" and wait for the project to build
- Go to repository settings -> Secrets and variables -> Actions -> Variables and add
DENO_DEPLOY_PROJECT
variable with your Deno Deploy project name. - Wait for the project to build and go to the project URL
Important
This project requires access to Deno KV which is currently in beta.
Warning
Versions >= v3
does not support Vercel hosting. If you want to host this project on Vercel, use versions
<= v2
. To do this, go to v2 branch and follow the instructions corresponding to the version.
If you come across any errors or have suggestions for improvements, please create a new issue here and describe it clearly.
When submitting a pull request, please follow these steps:
- Clone this repository
https://github.com/IgorKowalczyk/github-views.git
- Create a branch from
main
and give it a meaningful name (e.g.my-awesome-new-feature
). - Open a pull request on GitHub and clearly describe the feature or fix you are proposing.
This project is licensed under the MIT. See the LICENSE file for details