From c8858b7f6d2048c44769bdaa1b16df5c914e896b Mon Sep 17 00:00:00 2001 From: Koichi Shiraishi Date: Fri, 9 Jun 2023 19:55:29 +0900 Subject: [PATCH] mkdocs: add some search features Signed-off-by: Koichi Shiraishi --- config/mkdocs.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/config/mkdocs.yml b/config/mkdocs.yml index c485a5a93..5ea6fbb09 100644 --- a/config/mkdocs.yml +++ b/config/mkdocs.yml @@ -20,6 +20,13 @@ theme: - navigation.instant - navigation.sections - toc.integrate + - search.suggest + - search.highlight + +plugins: + - search + - minify: + minify_html: true google_analytics: - UA-89201129-1 @@ -118,12 +125,6 @@ markdown_extensions: alternate_style: true - pymdownx.saneheaders: -plugins: - - search: - prebuild_index: true - - minify: - minify_html: true - # yamllint disable-line ## $ echo ' - "Home": Home.md' | tee nav.md; find . -maxdepth 2 -type f \( -name '*.md' -or -name '*.asciidoc' \) -and -not -wholename '*docs*' -and -not \( -name 'Home.md' -or -name 'nav.md' -or -name '_Footer.md' -or -name '_Sidebar.md' \) | awk -F'/' '{print $2}' | awk -F'.md' '{print ""$1": "$0}' | awk -F':' '{gsub( "-", " ", $1 ) gsub( ".asciidoc", "", $1 )} {print " - \""$1"\":"$2}' | sed 's|.asciidoc|.md|' | sort --ignore-case | tee -a nav.md && cat nav.md | pbcopy && rm -f nav.md