hero docs simplified steps

This commit is contained in:
mik-tf 2024-04-15 19:07:52 +00:00
parent 2c0f849383
commit 940e52cdee

View File

@ -112,6 +112,7 @@ hero mdbook -u https://git.ourworld.tf/tfgrid/info_tfgrid/src/branch/main/herosc
For the next steps, you can either run the commands locally (with -p and the proper path) or remotely (with -u and the proper URL). Running the command locally is useful when you are doing changes to the mdbook and you want to test them before pushing the new files to the remote repository.
- Build the book
- Note: add the parameter `-o` at the end of the line to open the book with your local browser
- Option 1: Build the book with a URL
```
hero mdbook -u https://git.ourworld.tf/tfgrid/info_tfgrid/src/branch/main/heroscript/bookname
@ -122,22 +123,9 @@ For the next steps, you can either run the commands locally (with -p and the pro
hero mdbook -p /path/to/tfgrid/info_tfgrid/src/branch/main/heroscript/bookname
```
- Open the book
- Option 1: Open the mdbook on your local browser with a URL:
```
hero mdbook -u https://git.ourworld.tf/tfgrid/info_tfgrid/src/branch/main/heroscript/bookname -o
```
- Option 2: Open the mdbook on your local browser with a local path:
```
hero mdbook -p /path/to/tfgrid/info_tfgrid/src/branch/main/heroscript/bookname -o
```
> Note: In all cases, make sure to replace **bookname** by the name of your book, e.g. test.
To preview the mdbook on a local browser (via the file **index.html**), run the following command and open a browser with the URL **localhost:5173**. Make sure to replace `<book_name>` with the name of the book.
If you are running hero on a VM with an SSH tunnel, to preview the mdbook on a local browser (via the file **index.html**), run the following command and open a browser with the URL **localhost:5173**. Make sure to replace `<book_name>` with the name of the book.
```
pushd /root/hero/www/info/<book_name>/; python3 -m http.server 5173; popd;
```