Skip to content

Commit a72c337

Browse files
authored
docs(readme): Readme layout enhancements and added notes (#332)
1 parent ad371e3 commit a72c337

File tree

1 file changed

+26
-101
lines changed

1 file changed

+26
-101
lines changed

README.md

Lines changed: 26 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
2525
[![GitHub Streak](https://streak-stats.demolab.com/?user=DenverCoder1)](https://git.io/streak-stats)
2626
```
2727

28-
> Note: See below for information about deploying the app on your own
28+
3. Star the repo 😄
29+
30+
> **Note** See below for customization options and about deploying the app on your own.
2931
3032
## ⚙ Demo Site
3133

@@ -35,23 +37,6 @@ Here you can customize your Streak Stats card with a live preview.
3537

3638
[![Demo Site](https://user-images.githubusercontent.com/20955511/114579753-dbac8780-9c86-11eb-97dd-207039f67d20.gif "Demo Site")](http://streak-stats.demolab.com/demo/)
3739

38-
## 🖌 Themes
39-
40-
To enable a theme, append `&theme=` followed by the theme name to the end of the source url:
41-
42-
```md
43-
[![GitHub Streak](https://streak-stats.demolab.com/?user=DenverCoder1&theme=dark)](https://git.io/streak-stats)
44-
```
45-
46-
| Theme | Preview |
47-
| :------------: | :-----------------------------------------------------------: |
48-
| `default` | ![default](https://i.imgur.com/IaTuYdS.png) |
49-
| `dark` | ![dark](https://i.imgur.com/bUrsjlp.png) |
50-
| `highcontrast` | ![highcontrast](https://i.imgur.com/ovrVrTY.png) |
51-
| More themes! | **🎨 [See a list of all available themes](./docs/themes.md)** |
52-
53-
> If you have come up with a new theme you'd like to share with others, open an issue to add it!
54-
5540
## 🔧 Options
5641

5742
The `user` field is the only required option. All other fields are optional.
@@ -78,6 +63,23 @@ If the `theme` parameter is specified, any color customizations specified will b
7863
| `locale` | Locale to use for labels (Default: `en`) | ISO 639-1 code (See [`translations.php`](./src/translations.php)) |
7964
| `type` | Output format (Default: `svg`) | Current options: `svg`, `png` or `json` |
8065

66+
## 🖌 Themes
67+
68+
To enable a theme, append `&theme=` followed by the theme name to the end of the source url:
69+
70+
```md
71+
[![GitHub Streak](https://streak-stats.demolab.com/?user=DenverCoder1&theme=dark)](https://git.io/streak-stats)
72+
```
73+
74+
| Theme | Preview |
75+
| :------------: | :-----------------------------------------------------------: |
76+
| `default` | ![default](https://i.imgur.com/IaTuYdS.png) |
77+
| `dark` | ![dark](https://i.imgur.com/bUrsjlp.png) |
78+
| `highcontrast` | ![highcontrast](https://i.imgur.com/ovrVrTY.png) |
79+
| More themes! | **🎨 [See a list of all available themes](./docs/themes.md)** |
80+
81+
**If you have come up with a new theme you'd like to share with others, open an issue to add it!**
82+
8183
### Date Formats
8284

8385
A custom date format can be specified by passing a string to the `date_format` parameter.
@@ -107,13 +109,14 @@ This tool uses the contribution graphs on your GitHub profile to calculate which
107109

108110
To include contributions in private repositories, turn on the setting for "Private contributions" from the dropdown menu above the contribution graph on your profile page.
109111

110-
Contributions include commits, pull requests, and issues that you create in standalone repositories ([Learn more about what is considered a contribution](https://docs.github.com/articles/why-are-my-contributions-not-showing-up-on-my-profile)).
112+
Contributions include commits, pull requests, and issues that you create in standalone repositories.
111113

112114
The longest streak is the highest number of consecutive days on which you have made at least one contribution.
113115

114116
The current streak is the number of consecutive days ending with the current day on which you have made at least one contribution. If you have made a contribution today, it will be counted towards the current streak, however, if you have not made a contribution today, the streak will only count days before today so that your streak will not be zero.
115117

116-
> Note: You may need to wait up to 24 hours for new contributions to show up ([Learn how contributions are counted](https://docs.github.com/articles/why-are-my-contributions-not-showing-up-on-my-profile))
118+
> **Note**
119+
> You may need to wait up to 24 hours for new contributions to show up ([Learn how contributions are counted](https://docs.github.com/articles/why-are-my-contributions-not-showing-up-on-my-profile))
117120
118121
## 📤 Deploying it on your own
119122

@@ -123,6 +126,8 @@ Doing this can lead to better uptime and more control over customization (you ca
123126

124127
You can deploy the PHP files on any website server with PHP installed or as a Heroku app.
125128

129+
The Inkscape dependency is required for PNG rendering, as well as Segoe UI font for the intended rendering. If using Heroku, the buildpacks will install these for you automatically.
130+
126131
### Deploy Streak Stats instantly
127132

128133
[![Heroku_logo](https://user-images.githubusercontent.com/20955511/136292872-ab2b3918-3350-4878-93a2-aa1f569b095a.png)](https://heroku.com)
@@ -154,87 +159,7 @@ Contributions are welcome! Feel free to open an issue or submit a pull request i
154159

155160
Make sure your request is meaningful and you have tested the app locally before submitting a pull request.
156161

157-
### Installing Requirements
158-
159-
#### Requirements
160-
161-
- [PHP 8.1+](https://www.apachefriends.org/index.html)
162-
- [Composer](https://getcomposer.org)
163-
- [Inkscape](https://inkscape.org) (for PNG rendering)
164-
165-
#### Linux
166-
167-
```bash
168-
sudo apt-get install php
169-
sudo apt-get install php-curl
170-
sudo apt-get install composer
171-
sudo apt-get install inkscape
172-
```
173-
174-
#### Windows
175-
176-
Install PHP from [XAMPP](https://www.apachefriends.org/index.html) or [php.net](https://windows.php.net/download)
177-
178-
[▶ How to install and run PHP using XAMPP (Windows)](https://www.youtube.com/watch?v=K-qXW9ymeYQ)
179-
180-
[📥 Download Composer](https://getcomposer.org/download/)
181-
182-
### Clone the repository
183-
184-
```bash
185-
git clone https://github.com/DenverCoder1/github-readme-streak-stats.git
186-
cd github-readme-streak-stats
187-
```
188-
189-
### Install dependencies
190-
191-
Run the following command to install all the required dependencies to work on this project.
192-
193-
```bash
194-
composer install
195-
```
196-
197-
### Authorization
198-
199-
To get the GitHub API to run locally you will need to provide a token.
200-
201-
1. Visit [this link](https://github.com/settings/tokens/new?description=GitHub%20Readme%20Streak%20Stats) to create a new Personal Access Token
202-
2. Scroll to the bottom and click **"Generate token"**
203-
3. **Make a copy** of `.env.example` named `.env` in the root directory and add **your token** after `TOKEN=`:
204-
205-
```php
206-
TOKEN=<your-token>
207-
```
208-
209-
### Running the app locally
210-
211-
```bash
212-
composer start
213-
```
214-
215-
Open <http://localhost:8000/?user=DenverCoder1> to run the project locally.
216-
217-
Open <http://localhost:8000/demo/> to run the demo site.
218-
219-
### Running the tests
220-
221-
Run the following command to run the PHPUnit test script which will verify that the tested functionality is still working.
222-
223-
```bash
224-
composer test
225-
```
226-
227-
### Linting
228-
229-
This project uses Prettier for formatting PHP, Markdown, JavaScript and CSS files.
230-
231-
```bash
232-
# Run prettier and show the files that need to be fixed
233-
composer lint
234-
235-
# Run prettier and fix the files
236-
composer lint-fix
237-
```
162+
Refer to [CONTRIBUTING.md](/CONTRIBUTING.md) for more details on contributing, installing requirements, and running the application.
238163

239164
## 🙋‍♂️ Support
240165

0 commit comments

Comments
 (0)