{{- $page := .page }} {{- $location := .location }} {{- if eq $location "footer" }} {{- with $page }} {{- $assetBusting := partialCached "assetbusting.hugo" . }} {{- $urlOpenapi := "" }} {{- $relOpenapi := "" }} {{- $cssInProject := false }} {{- if and (isset .Params "customopenapiurl") .Params.customOpenapiURL }} {{- $urlOpenapi = .Params.customOpenapiURL }} {{- $relOpenapi = .Params.customOpenapiURL }} {{- else if and (isset .Site.Params "customopenapiurl") .Site.Params.customOpenapiURL }} {{- $urlOpenapi = .Site.Params.customOpenapiURL }} {{- $relOpenapi = .Site.Params.customOpenapiURL }} {{- else }} {{- $urlOpenapi = printf "%s%s" ("js/swagger-ui/swagger-ui-bundle.js" | relURL) $assetBusting }} {{- $relOpenapi = printf "%s%s" ("/js/swagger-ui/swagger-ui-bundle.js") $assetBusting }} {{- $cssInProject = true }} {{- end }} {{- $urlOpenapi := replace $urlOpenapi "swagger-ui-bundle" "swagger-ui-standalone-preset" }} {{- $relOpenapi := replace $relOpenapi "swagger-ui-bundle" "swagger-ui" }} {{- $relOpenapi := replace $relOpenapi ".js" ".css" }} {{- end }} {{- end }}