Skip to content

Commit 91c3826

Browse files
committed
pin the mdbook-katex and mdbook-bib as well
1 parent 48945ca commit 91c3826

File tree

3 files changed

+23
-9
lines changed

3 files changed

+23
-9
lines changed

.github/workflows/mdbook.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@ jobs:
2525
with:
2626
path: /usr/local/cargo/bin
2727
# Updated key to 0.4.52 to ensure we cache the correct stable version
28-
key: ${{ runner.os }}-mdbook-0.4.52-${{ hashFiles('**/book.toml') }}
28+
key: ${{ runner.os }}-mdbook-0.4.52-v2-${{ hashFiles('**/book.toml') }}
2929
restore-keys: |
30-
${{ runner.os }}-mdbook-0.4.52-
30+
${{ runner.os }}-mdbook-0.4.52-v2
3131
3232
- name: Install mdBook and preprocessors
3333
run: |
3434
# Pin mdbook to 0.4.52 for compatibility with older preprocessors
3535
command -v mdbook >/dev/null 2>&1 || cargo install mdbook --version 0.4.52
36-
command -v mdbook-katex >/dev/null 2>&1 || cargo install mdbook-katex
37-
command -v mdbook-bib >/dev/null 2>&1 || cargo install mdbook-bib
36+
command -v mdbook-katex >/dev/null 2>&1 || cargo install mdbook-katex --version 0.3.0
37+
command -v mdbook-bib >/dev/null 2>&1 || cargo install mdbook-bib --version 0.0.3
3838
3939
- name: Build mdBook
4040
run: mdbook build documentation/mdbook

documentation/mdbook/book.toml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,15 @@ after = ["links"] # By setting after = ["links"], you ensure that link processin
1414
[output.html]
1515
additional-css = ["theme/custom.css"]
1616

17+
# [preprocessor.bib]
18+
# # The name of your .bib file, relative to the src directory
19+
# # Ensure it runs after links but before katex
20+
# after = ["links"]
21+
# before = ["katex"]
22+
# bibliography = "bibliography.bib"
23+
1724
[preprocessor.bib]
18-
# The name of your .bib file, relative to the src directory
19-
# Ensure it runs after links but before katex
20-
after = ["links"]
21-
before = ["katex"]
25+
# Remove 'after' and 'before' for a moment to see if it's a sorting issue
2226
bibliography = "bibliography.bib"
2327

2428
# Optional: Set the title for the automatically generated bibliography chapter

documentation/mdbook/src/contributors.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,17 @@ Create a `.bib` file (e.g., `bibliography.bib`) in the root of the `documentatio
6868
3. Configure `book.toml`
6969

7070
Tell mdBook to use the `mdbook-bib` preprocessor and specify the path to the
71-
bibliography file in the `book.toml` configuration file. Add the following section
71+
bibliography file in the `book.toml` configuration file.
72+
73+
Make sure any GitHub workflows also install `mdbook-bib`, e.g.,
74+
75+
```bash
76+
- name: Install mdBook and preprocessors
77+
run: |
78+
cargo install mdbook mdbook-katex mdbook-bib
79+
```
80+
81+
Add the following section
7282
to the `book.toml`:
7383

7484
```sh

0 commit comments

Comments
 (0)