Skip to content

Commit

Permalink
update READMEs and enable link checks again
Browse files Browse the repository at this point in the history
  • Loading branch information
emuell committed Aug 1, 2024
1 parent 8102d5b commit 00dbb2c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 20 deletions.
14 changes: 4 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,23 @@ You can read the docs at [https://renoise.github.io/xrnx](https://renoise.github

## Development

### Install mdBook
### Requirements

The docs are generated using [mdBook](https://github.com/rust-lang/mdBook). To preview the pages locally you will need [cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html) to install mdbook and mdbook-linkcheck (which is used to make sure there are no broken links in the book).

```sh
cargo install mdbook
cargo install mdbook-linkcheck
```
### Generate API reference

There is a dirty [build script](generate/build.sh) that will download a given lua-language-server version from github, patch the necessary files so the doc output is somewhat usable and then run the API generator.

```sh
cd xrnx
./generate/build.sh "3.9.3"
```
### Building

Afterwards you can serve the docs at `localhost:3000` using mdbook, this will automatically refresh the browser tab whenever you change markdown files.

```sh
mdbook serve --open
```

# Acknowledgements
### Generate API reference

Thanks to Matt Allan and his [mdbook-luacats repo](https://github.com/matt-allan/) that served as a starting point for the API generation.
See [generate/README.md](./generate/README.md)
3 changes: 2 additions & 1 deletion book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ create-missing = false
default-theme = "dark"
preferred-dark-theme = "coal"

#[output.linkcheck]
[output.linkcheck]
warning-policy = "ignore"
20 changes: 11 additions & 9 deletions generate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ It is based on [matt-allan's](https://github.com/matt-allan) [mdbook-luacat](htt

### Requirements

- [rust v1.56 or higher](https://www.rust-lang.org/tools/install)
- [mdbook](https://rust-lang.github.io/mdBook/guide/installation.html)
- local LuaLS server installation
- [rust](https://www.rust-lang.org/tools/install) v1.56 or higher
- [LuaLS](https://github.com/luals/lua-language-server) installation

Note: The LuaLS installation must be placed into the folder [./lua-language-server](./lua-language-server) folder and **must be patched**.

Expand All @@ -22,18 +21,21 @@ See [build.sh](./build.sh) for details.
To create or update the API definitions chapter, build and run the app, then build the book:

```bash
cd XRNX # XRNX root directory!
# in the XRNX root directory
cd XRNX
# build and run the generate app to create the API definition
cargo run -- ./definitions/library ./docs
mdbook serve # or mdbook build
# serve or build the book
mdbook serve
```

---

Alternatively, if you have vscode installed, open the XRNX repository folder and use the provided build task to build the API and the book.
Alternatively, if you have vscode installed, open the XRNX repository folder and use the provided build task to build the API and the book:

- build: API Docs: compiles and runs the API docs generator
- build: book: compiles the mdbook
- serve: book: serve and live update the book at //localhost:3000
- `build: API Docs`: compiles and runs the API docs generator
- `build: book`: compiles the mdbook
- `serve: book`: serve and live update the book at //localhost:3000


## Debugging
Expand Down

0 comments on commit 00dbb2c

Please sign in to comment.