Skip to content

Commit 978da7f

Browse files
Re-add fs-summary and toc to pre-processors
Signed-off-by: Danil Grigorev <[email protected]>
1 parent 065c2b8 commit 978da7f

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

docs/book/Makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@ TABULATE := $(TOOLS_BIN_DIR)/mdbook-tabulate
2222
EMBED := $(TOOLS_BIN_DIR)/mdbook-embed
2323
RELEASELINK := $(TOOLS_BIN_DIR)/mdbook-releaselink
2424
MDBOOK := $(TOOLS_BIN_DIR)/bin/mdbook
25+
FS_SUMMARY := $(TOOLS_BIN_DIR)/bin/mdbook-fs-summary
2526

2627
export PATH := $(abspath $(TOOLS_BIN_DIR)/bin):$(PATH)
2728

28-
BOOK_DEPS := $(MDBOOK) $(TABULATE) $(EMBED) $(RELEASELINK)
29+
BOOK_DEPS := $(MDBOOK) $(TABULATE) $(EMBED) $(RELEASELINK) $(FS_SUMMARY)
2930

3031
$(TOOLS_BIN_DIR)/%: $(TOOLS_DIR_DEPS)
3132
make -C $(TOOLS_DIR) $(subst $(TOOLS_DIR)/,,$@)

docs/book/book.toml

+14-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,19 @@ src = "src"
55
title = "Cluster API Operator"
66
description = "Cluster API Operator"
77

8+
[preprocessor.toc]
9+
command = "mdbook-toc"
10+
marker = "[[_TOC_]]"
11+
12+
[preprocessor.fs-summary]
13+
# (default: true)
14+
clean-paths = false
15+
16+
# other preprocessors will naturally need to
17+
# run after the summary has been generated
18+
[preprocessor.links]
19+
after = ["fs-summary"]
20+
821
[output.html]
922
mathjax-support = true
1023
git-repository-url = "https://github.com/kubernetes-sigs/cluster-api-operator"
@@ -22,4 +35,4 @@ command = "./util-tabulate.sh"
2235
command = "./util-embed.sh"
2336

2437
[preprocessor.releaselink]
25-
command = "./util-releaselink.sh"
38+
command = "./util-releaselink.sh"

scripts/ci-install-mdbook.sh

+2
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,5 @@ curl https://sh.rustup.rs -sSf | sh -s -- -y
3030

3131
# Install mdbook and dependencies
3232
cargo install mdbook --version "$VERSION" --root "$OUTPUT_PATH"
33+
cargo install mdbook-fs-summary --root "$OUTPUT_PATH"
34+
cargo install mdbook-toc --root "$OUTPUT_PATH"

0 commit comments

Comments
 (0)