diff --git a/book.toml b/book.toml index 5822788..1ef6742 100644 --- a/book.toml +++ b/book.toml @@ -15,6 +15,7 @@ edit-url-template = "https://github.com/rust-tieng-viet/rust-tieng-viet.github.i [output.linkcheck] # Check links on the internet follow-web-links = false +optional = true [output.html.playground] editable = true diff --git a/dev.sh b/dev.sh index 363b73b..cb0b197 100755 --- a/dev.sh +++ b/dev.sh @@ -1,8 +1,15 @@ #!/bin/bash +PORT=${1:-3000} + if ! command -v mdbook &>/dev/null; then echo Installing mdBook https://rust-lang.github.io/mdBook/guide/installation.html ... cargo install mdbook fi -mdbook serve --open +if ! command -v mdbook-linkcheck &>/dev/null; then + echo Installing mdbook-linkcheck + cargo install mdbook-linkcheck +fi + +mdbook serve --open --port $PORT