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
} -%}
{%- 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 }) -%}

View File

@ -401,7 +401,10 @@
<!-- Versioning -->
{%- 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 -%}
<!-- Tags -->