book
book.toml
+custom.css
book: build
deploy: book
+ @git add -f book
+ @git commit -m "add book"
@git subtree push --prefix book origin gh-pages
+ @git rm -rf book
+ @git commit -m "remove book"
ensure:
@sh scripts/ensure.sh
clean:
- @[ -d src ] && mdbook clean
+ @[ -d src ] && mdbook clean || true
clean-tests:
@rm -rf *.gw log vlog
clean-all: clean clean-tests
- @rm -rf src
+ @rm -rf src book.toml custom.css
.SUFFIXES: .gw .test
.gw.test:
[book]
authors = ["Jérémie Astor"]
title = "Gwion"
-
+theme = "rust"
[output.html]
additional-css = ["custom.css"]
}
css() {
-cat <<EOF > src/custom.css
+cat <<EOF > custom.css
.mdr {
color:var(--sidebar-active);
background-color:var(--sidebar-bg);
[ -f book.toml ] || toml
-[ -f src/custom.css ] || css
+[ -f custom.css ] || css