Skip to content

Commit

Permalink
dependency: allow for empty customURL option #721
Browse files Browse the repository at this point in the history
  • Loading branch information
McShelby committed Nov 16, 2023
1 parent 2e07b80 commit 264250c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions layouts/partials/dependencies/mathjax.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/dependencies/mermaid.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/dependencies/openapi.html
Original file line number Diff line number Diff line change
@@ -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 }}
Expand Down

0 comments on commit 264250c

Please sign in to comment.