Skip to content

Commit 290b50d

Browse files
authored
fix: pin versions to fix mdbook build error (#106)
1 parent eaa9eb9 commit 290b50d

File tree

3 files changed

+16
-14
lines changed

3 files changed

+16
-14
lines changed

.github/workflows/mdbook.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,19 @@ jobs:
2929
build:
3030
runs-on: ubuntu-latest
3131
env:
32-
MDBOOK_VERSION: 0.4.36
32+
MDBOOK_VERSION: 0.4.52
33+
MDBOOK_MERMAID_VERSION: 0.10.0
3334
steps:
3435
- uses: actions/checkout@v4
3536
- name: Install mdBook
3637
run: |
3738
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf -y | sh
3839
rustup update
40+
# Install mdbook v0.4.52 (required for mdbook-embedify compatibility)
3941
cargo install --version ${MDBOOK_VERSION} mdbook
40-
cargo install mdbook-mermaid
42+
# Install mdbook-mermaid v0.10.0 (compatible with mdbook 0.4.52)
43+
cargo install --version ${MDBOOK_MERMAID_VERSION} mdbook-mermaid
44+
# Install mdbook-embedify (latest version compatible with mdbook 0.4.52)
4145
cargo install mdbook-embedify
4246
- name: Setup Pages
4347
id: pages

MDBOOK.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,22 @@ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
1313
To install mdBook, run the following command:
1414

1515
```bash
16-
cargo install mdbook
16+
# Install mdbook v0.4.52 (required for mdbook-embedify compatibility)
17+
cargo install mdbook --version 0.4.52
1718
```
1819

1920
Install required preprocessors:
2021

2122
```sh
22-
# Install mdbook-mermaid for Mermaid diagram support
23-
cargo install mdbook-mermaid
23+
# Install mdbook-mermaid v0.10.0 (compatible with mdbook 0.4.52)
24+
cargo install mdbook-mermaid --version 0.10.0
2425

2526
# Install mdbook-embedify for embedding external content
2627
cargo install mdbook-embedify
2728
```
2829

30+
**Note:** These specific versions are required for compatibility. mdbook-embedify 0.2.18 is not compatible with mdbook 0.5.x, so we use mdbook 0.4.52 and a compatible version of mdbook-mermaid.
31+
2932
## Usage
3033

3134
To build the book, run the following command:

book.toml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,23 @@
11
[book]
22
authors = ["InnerSource Commons"]
33
language = "en"
4-
multilingual = false
54
src = "."
65
title = "How To Create An InnerSource Program Office"
76

8-
[preprocessor]
9-
107
[preprocessor.mermaid]
118
command = "mdbook-mermaid"
129

1310
[preprocessor.embedify]
1411
giscus.enable = true
1512
giscus.repo = "InnerSourceCommons/managing-innersource-projects"
16-
giscus.repo-id = "MDEwOlJlcG9zaXRvcnk4MjY2ODc3OA=="
13+
giscus."repo-id" = "MDEwOlJlcG9zaXRvcnk4MjY2ODc3OA=="
1714
giscus.category = "Website"
18-
giscus.category-id = "DIC_kwDOBO1s6s4CiMTg"
19-
giscus.reactions-enabled = "1"
15+
giscus."category-id" = "DIC_kwDOBO1s6s4CiMTg"
16+
giscus."reactions-enabled" = "1"
2017
giscus.theme = "preferred_color_scheme"
2118
giscus.lang = "en"
22-
giscus.loading = "eager"
19+
giscus.loading = "lazy"
2320
giscus.crossorigin = "anonymous"
2421

25-
[output]
26-
2722
[output.html]
2823
additional-js = ["mermaid.min.js", "mermaid-init.js"]

0 commit comments

Comments
 (0)