Skip to content

Commit fbfb9d0

Browse files
committed
chore(docs): update README.md
1 parent 1d7a582 commit fbfb9d0

File tree

1 file changed

+19
-23
lines changed

1 file changed

+19
-23
lines changed

README.md

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,29 @@ A user state page builder for Minecraft.
44
# How to use
55
You can simply build your own web pages, just follow this instruction.
66

7-
_You need to do these command in a series._
7+
_You need to do these commands in a series._
88

99
## First grab user data from map folder
1010
1. Clone the project.
11-
2. `npm install`.
12-
3. Rename config.example.yml to config.yml and modify it.
13-
4. Run `npm start`. This will take long time to grab the informations for each user, be patient. Your data will be written to your `output` directory defined in config file.
11+
2. Run `npm install`.
12+
3. Rename `config.example.yml` to `config.yml`, read it and update it with your preferences.
13+
4. Run `npm start`. It might take a long time runing several tasks for each of your players, so be patient. The result data will be written to the directory you defined as `render.output` in `config.yml`.
1414

1515
## Build web pages
1616
1. Go into `web` folder.
17-
2. `npm install && npm run build`.
17+
2. Run `npm install && npm run build`.
1818

1919
## Build skin render
2020
1. Go into `skin` folder.
21-
2. `npm install && npm run build`.
21+
2. Run `npm install && npm run build`.
2222

23-
## That's all
24-
Now you can find all the files you need in the `web/dist` folder.
23+
## Prepare to deploy
24+
Now you can find all the files you need in the `web/dist` folder. Create a folder named `webroot` and collect your files:
2525

26-
Move files in place:
26+
1. Move everything UNDER `web/dist` to webroot folder.
27+
2. Move the `render.output` directory you defined to `webroot/data`.
2728

28-
* Move everything under `web/dist` to your webroot
29-
* Move the output directory you defined to `webroot/data`
30-
31-
### Final File Structures
29+
Your webroot folder should now look like this:
3230

3331
```
3432
- webroot
@@ -44,14 +42,16 @@ Move files in place:
4442
+ skin
4543
```
4644

47-
Upload webroot to you server, and configure your nginx server like this:
45+
## That's all!
46+
47+
Upload webroot folder to your server, and configure your server like this: (We assume you use Nginx)
4848

4949
```
5050
server {
5151
listen 80 default_server;
5252
listen [::]:80 default_server;
5353
54-
root /your/root/path;
54+
root /your/path/to/webroot;
5555
5656
index index.html;
5757
@@ -64,20 +64,16 @@ server {
6464
location @rewrites {
6565
rewrite ^(.+)$ /index.html last;
6666
}
67-
6867
}
6968
```
7069

71-
> Notice:
72-
73-
>If you want to deploy without nignx, you will need to change the router mode from `history` to `hash` [here](https://github.com/NyaaCat/NyaaStats/blob/713303de573ac36b9cd7ef8f20100aa3eb993273/web/src/router/index.js#L11). Remember to rebuild web pages.
70+
> If you don't use Nginx, or you don't want to change any server config (by switching to "hash mode"), please read https://router.vuejs.org/guide/essentials/history-mode.html for further information.
71+
>
72+
> In case you want to switch, the router config can be found at `/web/src/router/index.js`.
7473
7574
## Update player data
7675

7776
Run `npm start` in the root folder of this project which means recreate the data folder and upload it to your web root. You don't need to run other commands everytime you update players' data but needed when we upgrade the code of our web client.
7877

79-
80-
81-
8278
# Credits
83-
The skin render is almost a copy from [NameMC](https://namemc.com). Thanks for their excellent work.
79+
The skin render is almost a copy of [NameMC](https://namemc.com). Thanks for their excellent work.

0 commit comments

Comments
 (0)