Skip to content

Commit

Permalink
Added support to disable version selector in mike
Browse files Browse the repository at this point in the history
  • Loading branch information
squidfunk committed Nov 19, 2023
1 parent 9721228 commit c181a46
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion material/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) -%}
Expand Down
5 changes: 4 additions & 1 deletion src/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 -->
Expand Down

0 comments on commit c181a46

Please sign in to comment.