Skip to content

Commit 36217dd

Browse files
authored
Merge pull request #11 from crc-org/update-mdbook
Update mdbook and add kroki
2 parents f73a0aa + 0ab8507 commit 36217dd

File tree

6 files changed

+23
-12
lines changed

6 files changed

+23
-12
lines changed

.devcontainer/Containerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM quay.io/crc-org/mdbook:0.4.42
1+
FROM quay.io/crc-org/mdbook:0.4.43
22

33
RUN dnf install -y git-core \
44
&& dnf clean all \

.github/workflows/gh-pages.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Check out repository code
1717
uses: actions/checkout@v4
1818
- name: Build docs
19-
run: docker run --rm -v $PWD:/workspace quay.io/crc-org/mdbook:0.4.42 mdbook build
19+
run: docker run --rm -v $PWD:/workspace quay.io/crc-org/mdbook:0.4.43 build
2020
- name: Deploy
2121
uses: peaceiris/actions-gh-pages@v4
2222
if: github.ref == 'refs/heads/main'

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ For example, it is easy to use `.` to start the GitHub Web Editor to read and ed
2626
To create the HTML output, you can use:
2727

2828
```
29-
$ podman run --rm -v $PWD:/workspace quay.io/crc-org/mdbook:0.4.42 mdbook build
29+
$ podman run --rm -v $PWD:/workspace quay.io/crc-org/mdbook:0.4.43 build
3030
```
3131

3232
This will create a `book` folder that contains the output for a static webpage like GitHub Pages.

book.toml

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,6 @@ title = "CRC Engineering docs"
99
default-theme = "light"
1010
preferred-dark-theme = "light"
1111

12-
[preprocessor.callouts]
12+
[preprocessor.callouts]
13+
14+
[preprocessor.kroki]

containers/Containerfile

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
11
FROM registry.fedoraproject.org/fedora:40 AS builder
22

33

4-
RUN dnf install -y cargo \
4+
RUN dnf install -y cargo openssl-devel \
55
&& cargo install mdbook \
66
&& cargo install mdbook-callouts \
7-
&& cargo install mdbook-mermaid
7+
&& cargo install mdbook-mermaid \
8+
&& cargo install mdbook-kroki-preprocessor
89

910

1011
FROM registry.fedoraproject.org/fedora:40
1112

1213
COPY --from=builder /root/.cargo/bin/mdbook /usr/bin
1314
COPY --from=builder /root/.cargo/bin/mdbook-callouts /usr/bin
1415
COPY --from=builder /root/.cargo/bin/mdbook-mermaid /usr/bin
16+
COPY --from=builder /root/.cargo/bin/mdbook-kroki-preprocessor /usr/bin/mdbook-kroki
1517

1618
RUN mkdir -p /workspace
1719
VOLUME /workspace
1820
WORKDIR /workspace
21+
22+
ENTRYPOINT ["/usr/bin/mdbook"]

containers/README.md

+11-6
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,22 @@ This Fedora container image contains:
66

77
- mdBook: https://github.com/rust-lang/mdBook
88
create book from markdown files, like Gitbook
9-
- mdBook preprocessor: https://crates.io/crates/mdbook-callouts
10-
to add Obsidian Flavored Markdown's Callouts
9+
- mdBook preprocessors:
10+
- https://crates.io/crates/mdbook-callouts
11+
to add Obsidian Flavored Markdown's Callouts
12+
- https://github.com/badboy/mdbook-mermaid
13+
to add mermaid support
14+
- https://github.com/JoelCourtney/mdbook-kroki-preprocessor
15+
to render Kroki diagrams from files or code blocks
1116

1217

1318
## Usage instructions
1419
Start the container in the folder that contains your documentation source
1520

1621
```bash
1722
$ podman run --rm -v $PWD:/workspace \
18-
quay.io/crc-org/mdbook:0.4.42 \
19-
mdbook build
23+
quay.io/crc-org/mdbook:0.4.43 \
24+
build
2025
```
2126

2227
This will generate a `book` output.
@@ -25,8 +30,8 @@ Or using
2530

2631
```bash
2732
$ podman run --rm -v $PWD:/workspace -p 3000:3000 \
28-
quay.io/crc-org/mdbook:0.4.42 \
29-
mdbook serve
33+
quay.io/crc-org/mdbook:0.4.43 \
34+
serve
3035
```
3136

3237
the generated content will be published using the embedded server on [`http://localhost:3000`](http://localhost:3000)

0 commit comments

Comments
 (0)