Skip to content

Commit

Permalink
Re-add fs-summary and toc to pre-processors
Browse files Browse the repository at this point in the history
Signed-off-by: Danil Grigorev <danil.grigorev@suse.com>
  • Loading branch information
Danil-Grigorev committed Mar 6, 2024
1 parent 065c2b8 commit 978da7f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docs/book/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ TABULATE := $(TOOLS_BIN_DIR)/mdbook-tabulate
EMBED := $(TOOLS_BIN_DIR)/mdbook-embed
RELEASELINK := $(TOOLS_BIN_DIR)/mdbook-releaselink
MDBOOK := $(TOOLS_BIN_DIR)/bin/mdbook
FS_SUMMARY := $(TOOLS_BIN_DIR)/bin/mdbook-fs-summary

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

BOOK_DEPS := $(MDBOOK) $(TABULATE) $(EMBED) $(RELEASELINK)
BOOK_DEPS := $(MDBOOK) $(TABULATE) $(EMBED) $(RELEASELINK) $(FS_SUMMARY)

$(TOOLS_BIN_DIR)/%: $(TOOLS_DIR_DEPS)
make -C $(TOOLS_DIR) $(subst $(TOOLS_DIR)/,,$@)
Expand Down
15 changes: 14 additions & 1 deletion docs/book/book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ src = "src"
title = "Cluster API Operator"
description = "Cluster API Operator"

[preprocessor.toc]
command = "mdbook-toc"
marker = "[[_TOC_]]"

[preprocessor.fs-summary]
# (default: true)
clean-paths = false

# other preprocessors will naturally need to
# run after the summary has been generated
[preprocessor.links]
after = ["fs-summary"]

[output.html]
mathjax-support = true
git-repository-url = "https://github.com/kubernetes-sigs/cluster-api-operator"
Expand All @@ -22,4 +35,4 @@ command = "./util-tabulate.sh"
command = "./util-embed.sh"

[preprocessor.releaselink]
command = "./util-releaselink.sh"
command = "./util-releaselink.sh"
2 changes: 2 additions & 0 deletions scripts/ci-install-mdbook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,5 @@ curl https://sh.rustup.rs -sSf | sh -s -- -y

# Install mdbook and dependencies
cargo install mdbook --version "$VERSION" --root "$OUTPUT_PATH"
cargo install mdbook-fs-summary --root "$OUTPUT_PATH"
cargo install mdbook-toc --root "$OUTPUT_PATH"

0 comments on commit 978da7f

Please sign in to comment.