From c181a46f741d001c925ea6cdbc746830dc92b17d Mon Sep 17 00:00:00 2001 From: squidfunk Date: Sun, 19 Nov 2023 11:03:43 +0100 Subject: [PATCH] Added support to disable version selector in mike --- material/templates/base.html | 5 ++++- src/templates/base.html | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/material/templates/base.html b/material/templates/base.html index 906222255..26fa21072 100644 --- a/material/templates/base.html +++ b/material/templates/base.html @@ -224,7 +224,10 @@ "search": "assets/javascripts/workers/search.f886a092.min.js" | url } -%} {%- if config.extra.version -%} - {%- set _ = app.update({ "version": config.extra.version }) -%} + {%- set mike = config.plugins.get("mike") -%} + {%- if not mike or mike.config.version_selector -%} + {%- set _ = app.update({ "version": config.extra.version }) -%} + {%- endif -%} {%- endif -%} {%- if config.extra.tags -%} {%- set _ = app.update({ "tags": config.extra.tags }) -%} diff --git a/src/templates/base.html b/src/templates/base.html index 8323e76e3..b447ea891 100644 --- a/src/templates/base.html +++ b/src/templates/base.html @@ -401,7 +401,10 @@ {%- if config.extra.version -%} - {%- set _ = app.update({ "version": config.extra.version }) -%} + {%- set mike = config.plugins.get("mike") -%} + {%- if not mike or mike.config.version_selector -%} + {%- set _ = app.update({ "version": config.extra.version }) -%} + {%- endif -%} {%- endif -%}