openapi: disable assets busting correctly

This commit is contained in:
Sören Weber 2023-05-18 00:11:23 +02:00
parent 899cab1cf6
commit 754b5c85ab
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D

View file

@ -100,7 +100,7 @@
{{- $urlOpenapi := replace $urlOpenapi "swagger-ui-standalone-preset" "swagger-ui" }}
{{- $urlOpenapi := replace $urlOpenapi ".js" ".css" }}
<script>
window.themeUseOpenapi = { css: {{ $urlOpenapi }}, assetsBuster: {{ cond (ne .Site.Params.disableAssetsBusting false) now.Unix 0 }} };
window.themeUseOpenapi = { css: {{ $urlOpenapi }}, assetsBuster: {{ cond (not .Site.Params.disableAssetsBusting) now.Unix 0 }} };
</script>
{{- end }}
<script src="{{"js/theme.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}" defer></script>