dependency: allow for empty customURL option #721

This commit is contained in:
Sören Weber 2023-11-16 20:55:32 +01:00
parent 2e07b80460
commit 264250c7c7
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D
3 changed files with 6 additions and 6 deletions

View file

@ -34,9 +34,9 @@
}
useMathJax( JSON.parse({{ $init }}) );
</script>
{{- if isset .Params "custommathjaxurl" }}
{{- if and (isset .Params "custommathjaxurl") .Params.customMathJaxURL }}
<script id="MathJax-script" async src="{{ .Params.customMathJaxURL }}"></script>
{{- else if isset .Site.Params "custommathjaxurl" }}
{{- else if and (isset .Site.Params "custommathjaxurl") .Site.Params.customMathJaxURL }}
<script id="MathJax-script" async src="{{ .Site.Params.customMathJaxURL }}"></script>
{{- else }}
<script id="MathJax-script" async src="{{"js/mathjax/tex-mml-chtml.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}"></script>

View file

@ -10,9 +10,9 @@
<script src="{{"js/d3/d3-transition.min.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}" defer></script>
<script src="{{"js/d3/d3-zoom.min.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}" defer></script>
<script src="{{"js/js-yaml.min.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}" defer></script>
{{- if isset .Params "custommermaidurl" }}
{{- if and (isset .Params "custommermaidurl") .Params.customMermaidURL }}
<script src="{{ .Params.customMermaidURL }}" defer></script>
{{- else if isset .Site.Params "custommermaidurl" }}
{{- else if and (isset .Site.Params "custommermaidurl") .Site.Params.customMermaidURL }}
<script src="{{ .Site.Params.customMermaidURL }}" defer></script>
{{- else }}
<script src="{{"js/mermaid.min.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}" defer></script>

View file

@ -1,9 +1,9 @@
{{- $page := .page }}
{{- with $page }}
{{- $urlOpenapi := "" }}
{{- if isset .Params "customopenapiurl" }}
{{- if and (isset .Params "customopenapiurl") .Params.customOpenapiURL }}
{{- $urlOpenapi = .Params.customOpenapiURL }}
{{- else if isset .Site.Params "customopenapiurl" }}
{{- else if and (isset .Site.Params "customopenapiurl") .Site.Params.customOpenapiURL }}
{{- $urlOpenapi = .Site.Params.customOpenapiURL }}
{{- else }}
{{- $urlOpenapi = "js/swagger-ui/swagger-ui-bundle.js" | relURL }}