From 00dbb2ceaecfd354260029d63031db0303806c40 Mon Sep 17 00:00:00 2001 From: Eduard Mueller Date: Thu, 1 Aug 2024 12:33:01 +0200 Subject: [PATCH] update READMEs and enable link checks again --- README.md | 14 ++++---------- book.toml | 3 ++- generate/README.md | 20 +++++++++++--------- 3 files changed, 17 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 7bd2a1f2..d9520711 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ 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). @@ -16,14 +16,8 @@ The docs are generated using [mdBook](https://github.com/rust-lang/mdBook). To p 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. @@ -31,6 +25,6 @@ Afterwards you can serve the docs at `localhost:3000` using mdbook, this will au 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) diff --git a/book.toml b/book.toml index cac68189..a9641720 100644 --- a/book.toml +++ b/book.toml @@ -12,4 +12,5 @@ create-missing = false default-theme = "dark" preferred-dark-theme = "coal" -#[output.linkcheck] +[output.linkcheck] +warning-policy = "ignore" \ No newline at end of file diff --git a/generate/README.md b/generate/README.md index 01048485..9eb8e622 100644 --- a/generate/README.md +++ b/generate/README.md @@ -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**. @@ -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