Skip to content

Commit 780fd79

Browse files
committed
fix: mdbook deploy by removing deprecated field and ensuring mermaid assets
- Remove deprecated 'multilingual' field from book.toml - Add ensure_mermaid_assets() to mdbook.sh to generate JS files before build
1 parent 9fddbed commit 780fd79

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

book.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[book]
22
authors = ["Ammar Bandukwala"]
33
language = "en"
4-
multilingual = false
54
src = "docs"
65
title = "httpjail"
76
description = "HTTP(S) Request Jailing: Control what your processes can request"

scripts/mdbook.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,15 @@ ensure_mdbook_mermaid() {
6565
exit 1
6666
fi
6767

68-
# Initialize mermaid support in the book
68+
}
69+
70+
# Ensure mermaid assets (JS files) are present
71+
ensure_mermaid_assets() {
6972
cd "${PROJECT_ROOT}"
70-
mdbook-mermaid install .
73+
if [ ! -f "mermaid.min.js" ] || [ ! -f "mermaid-init.js" ]; then
74+
log_info "Installing mermaid assets..."
75+
mdbook-mermaid install .
76+
fi
7177
}
7278

7379
# Install mdbook-linkcheck if not present
@@ -94,6 +100,7 @@ main() {
94100
ensure_mdbook
95101
ensure_mdbook_mermaid
96102
ensure_mdbook_linkcheck
103+
ensure_mermaid_assets
97104

98105
log_info "All prerequisites satisfied"
99106

0 commit comments

Comments
 (0)