Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/mdbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,19 @@ jobs:
build:
runs-on: ubuntu-latest
env:
MDBOOK_VERSION: 0.4.36
MDBOOK_VERSION: 0.4.52
MDBOOK_MERMAID_VERSION: 0.10.0
steps:
- uses: actions/checkout@v4
- name: Install mdBook
run: |
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf -y | sh
rustup update
# Install mdbook v0.4.52 (required for mdbook-embedify compatibility)
cargo install --version ${MDBOOK_VERSION} mdbook
cargo install mdbook-mermaid
# Install mdbook-mermaid v0.10.0 (compatible with mdbook 0.4.52)
cargo install --version ${MDBOOK_MERMAID_VERSION} mdbook-mermaid
# Install mdbook-embedify (latest version compatible with mdbook 0.4.52)
cargo install mdbook-embedify
- name: Setup Pages
id: pages
Expand Down
9 changes: 6 additions & 3 deletions MDBOOK.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,22 @@ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
To install mdBook, run the following command:

```bash
cargo install mdbook
# Install mdbook v0.4.52 (required for mdbook-embedify compatibility)
cargo install mdbook --version 0.4.52
```

Install required preprocessors:

```sh
# Install mdbook-mermaid for Mermaid diagram support
cargo install mdbook-mermaid
# Install mdbook-mermaid v0.10.0 (compatible with mdbook 0.4.52)
cargo install mdbook-mermaid --version 0.10.0

# Install mdbook-embedify for embedding external content
cargo install mdbook-embedify
```

**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.

## Usage

To build the book, run the following command:
Expand Down
13 changes: 4 additions & 9 deletions book.toml
Original file line number Diff line number Diff line change
@@ -1,28 +1,23 @@
[book]
authors = ["InnerSource Commons"]
language = "en"
multilingual = false
src = "."
title = "How To Create An InnerSource Program Office"

[preprocessor]

[preprocessor.mermaid]
command = "mdbook-mermaid"

[preprocessor.embedify]
giscus.enable = true
giscus.repo = "InnerSourceCommons/managing-innersource-projects"
giscus.repo-id = "MDEwOlJlcG9zaXRvcnk4MjY2ODc3OA=="
giscus."repo-id" = "MDEwOlJlcG9zaXRvcnk4MjY2ODc3OA=="
giscus.category = "Website"
giscus.category-id = "DIC_kwDOBO1s6s4CiMTg"
giscus.reactions-enabled = "1"
giscus."category-id" = "DIC_kwDOBO1s6s4CiMTg"
giscus."reactions-enabled" = "1"
giscus.theme = "preferred_color_scheme"
giscus.lang = "en"
giscus.loading = "eager"
giscus.loading = "lazy"
giscus.crossorigin = "anonymous"

[output]

[output.html]
additional-js = ["mermaid.min.js", "mermaid-init.js"]