You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+19-23Lines changed: 19 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,31 +4,29 @@ A user state page builder for Minecraft.
4
4
# How to use
5
5
You can simply build your own web pages, just follow this instruction.
6
6
7
-
_You need to do these command in a series._
7
+
_You need to do these commands in a series._
8
8
9
9
## First grab user data from map folder
10
10
1. Clone the project.
11
-
2.`npm install`.
12
-
3. Rename config.example.yml to config.ymland 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`.
14
14
15
15
## Build web pages
16
16
1. Go into `web` folder.
17
-
2.`npm install && npm run build`.
17
+
2.Run `npm install && npm run build`.
18
18
19
19
## Build skin render
20
20
1. Go into `skin` folder.
21
-
2.`npm install && npm run build`.
21
+
2.Run `npm install && npm run build`.
22
22
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:
25
25
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`.
27
28
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:
32
30
33
31
```
34
32
- webroot
@@ -44,14 +42,16 @@ Move files in place:
44
42
+ skin
45
43
```
46
44
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)
48
48
49
49
```
50
50
server {
51
51
listen 80 default_server;
52
52
listen [::]:80 default_server;
53
53
54
-
root /your/root/path;
54
+
root /your/path/to/webroot;
55
55
56
56
index index.html;
57
57
@@ -64,20 +64,16 @@ server {
64
64
location @rewrites {
65
65
rewrite ^(.+)$ /index.html last;
66
66
}
67
-
68
67
}
69
68
```
70
69
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`.
74
73
75
74
## Update player data
76
75
77
76
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.
78
77
79
-
80
-
81
-
82
78
# 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