1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-11-24 07:30:12 +01:00

Added support to disable version selector in mike

This commit is contained in:
squidfunk 2023-11-19 11:03:43 +01:00
parent 9721228f1f
commit c181a46f74
No known key found for this signature in database
GPG Key ID: 5ED40BC4F9C436DF
2 changed files with 8 additions and 2 deletions

View File

@ -224,7 +224,10 @@
"search": "assets/javascripts/workers/search.f886a092.min.js" | url "search": "assets/javascripts/workers/search.f886a092.min.js" | url
} -%} } -%}
{%- if config.extra.version -%} {%- 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 -%} {%- endif -%}
{%- if config.extra.tags -%} {%- if config.extra.tags -%}
{%- set _ = app.update({ "tags": config.extra.tags }) -%} {%- set _ = app.update({ "tags": config.extra.tags }) -%}

View File

@ -401,7 +401,10 @@
<!-- Versioning --> <!-- Versioning -->
{%- if config.extra.version -%} {%- 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 -%} {%- endif -%}
<!-- Tags --> <!-- Tags -->