Update README.md
This commit is contained in:
16
README.md
16
README.md
@@ -8,12 +8,16 @@ Once ran, you should be able to open `index.html` within the output folder to st
|
|||||||
**This is a very simplistic single-script-file example of using the book, chapter and pages
|
**This is a very simplistic single-script-file example of using the book, chapter and pages
|
||||||
API together**, the output lacks a lot of detail including styling and inter-content link transforming.
|
API together**, the output lacks a lot of detail including styling and inter-content link transforming.
|
||||||
|
|
||||||
|
This script is a slight modification of [this script](https://github.com/BookStackApp/api-scripts/tree/main/php-book-to-static-site) by [ssddanbrown](https://github.com/ssddanbrown)
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
- php (~7.2+)
|
- php ```~7.2+```
|
||||||
- BookStack API ```TOKEN_ID```
|
- BookStack API ```TOKEN_ID```
|
||||||
- TBookStack API ```TOKEN_SECRET```
|
- TBookStack API ```TOKEN_SECRET```
|
||||||
- Basic CSS file
|
- Markdown CSS file. One can be found here [http://markdowncss.github.io/](http://markdowncss.github.io/)
|
||||||
|
- A URL Slug of the desierd book you wish to export. e.g. https://bookstack.example.com/books/**example-book**
|
||||||
|
- A directory where you wish the book to be saved
|
||||||
|
|
||||||
## Running
|
## Running
|
||||||
|
|
||||||
@@ -35,9 +39,11 @@ Run the script
|
|||||||
php book-to-static.php <book_url_slug> <output_dir>
|
php book-to-static.php <book_url_slug> <output_dir>
|
||||||
```
|
```
|
||||||
|
|
||||||
*A url slug is the last part of the URL. In this case, that would be https://bookstack.example.com/books/**example_book***
|
#### An Example
|
||||||
## Examples
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Export a book with URL slug of my_book to an "out" directory
|
# Export a book with URL slug of my_book to an "out" directory
|
||||||
php book-to-static.php my_book ./out
|
php book-to-static.php example-book ./out
|
||||||
|
```
|
||||||
|
#### CSS
|
||||||
|
Move the desired css file in your output directory
|
||||||
Reference in New Issue
Block a user