Update README.md

This commit is contained in:
2024-03-30 16:58:32 +11:00
parent 5a461a33ae
commit b57e583acd

View File

@@ -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
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
- php (~7.2+)
- php ```~7.2+```
- BookStack API ```TOKEN_ID```
- 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
@@ -35,9 +39,11 @@ Run the script
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***
## Examples
#### An Example
```bash
# 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