Add MdBook generation script and precommit hook
This commit is contained in:
parent
2edc2e87fb
commit
6de76d9480
@ -12,3 +12,10 @@ repos:
|
||||
- id: cargo-check
|
||||
- id: clippy
|
||||
args: ["--", "-D", "warnings"]
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: mdbook
|
||||
name: mdbook
|
||||
entry: book/generate.sh
|
||||
language: script
|
||||
files: ^book/.*
|
||||
|
9
book/generate.sh
Executable file
9
book/generate.sh
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
cd "$(git rev-parse --show-toplevel)/book"
|
||||
|
||||
cargo run obsidian-src book-src
|
||||
mdbook build
|
||||
cp book-src/README.md ../README.md
|
Loading…
Reference in New Issue
Block a user