mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 07:47:54 +00:00
dependency: allow for empty customURL option #721
This commit is contained in:
parent
2e07b80460
commit
264250c7c7
3 changed files with 6 additions and 6 deletions
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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 }}
|
||||
|
|
Loading…
Reference in a new issue