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.mdfile
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.
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 ito install all dependencies, - Edit the
wrangler.jsoncfile with your values - Run
pnpm typesto generate types for the project - Run
pnpm devto start the development server orpnpm previewto preview the production build
- Clone this repository
git clone https://github.com/IgorKowalczyk/github-views.git - Run
pnpm ito install all dependencies, - Go to Cloudflare Workers and create a new project (you can import the project from GitHub)
- Go to Cloudflare > Storage & Databases -> KV -> Create, and create a new KV namespace
- Link the KV namespace to the project in the
wrangler.jsoncfile - Edit the
wrangler.jsoncfile with your values - Run
pnpm typesto generate types for the project - Run
pnpm devto start the development server orpnpm previewto preview the production build - If you want to deploy the project, run
pnpm checkto check the project andpnpm deployto deploy the project to Cloudflare Workers
Note
Refer to the Cloudflare Workers documentation and Wrangler documentation for more information.
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
mainand 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
