From 2a6cdd2ae5961c9ae11afd0f805af8e7bb6384ab Mon Sep 17 00:00:00 2001 From: flokoe Date: Tue, 4 Jul 2023 15:41:45 +0200 Subject: [PATCH] Enable convenience features in MkDocs Material - better navigation - search - comments via GitHub Discussions --- mkdocs.yml | 24 ++++++++++++++-- overrides/partials/comments.html | 48 ++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+), 2 deletions(-) create mode 100644 overrides/partials/comments.html diff --git a/mkdocs.yml b/mkdocs.yml index d9d28d6..a441027 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -6,10 +6,18 @@ edit_uri: edit/main/docs/ theme: name: material + custom_dir: overrides features: + - navigation.instant + - navigation.tracking - navigation.tabs + - navigation.sections + - navigation.top - content.action.view - content.action.edit + - search.suggest + - search.highlight + - content.code.copy icon: repo: fontawesome/brands/github @@ -18,11 +26,23 @@ plugins: tags_file: tags.md - git-revision-date-localized: enable_creation_date: true + - search + - awesome-pages + - minify: + minify_html: true + minify_css: true + minify_js: true + htmlmin_opts: + remove_comments: true + cache_safe: true markdown_extensions: - admonition nav: - Start: index.md - - Snipplets: snipplets/index.md - - tags.md \ No newline at end of file + - ... | regex=^(?!need_love\.md|bash4\.md|wishes\.md|tags\.md) + - tags.md + +watch: + - overrides diff --git a/overrides/partials/comments.html b/overrides/partials/comments.html new file mode 100644 index 0000000..cf3c4bf --- /dev/null +++ b/overrides/partials/comments.html @@ -0,0 +1,48 @@ +

{{ lang.t("meta.comments") }}

+ + + + +