From 264250c7c762fbe1b7586fabc5b1882e799c75ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Thu, 16 Nov 2023 20:55:32 +0100 Subject: [PATCH] dependency: allow for empty customURL option #721 --- layouts/partials/dependencies/mathjax.html | 4 ++-- layouts/partials/dependencies/mermaid.html | 4 ++-- layouts/partials/dependencies/openapi.html | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/layouts/partials/dependencies/mathjax.html b/layouts/partials/dependencies/mathjax.html index 3b0b0913b4..89f5957643 100644 --- a/layouts/partials/dependencies/mathjax.html +++ b/layouts/partials/dependencies/mathjax.html @@ -34,9 +34,9 @@ } useMathJax( JSON.parse({{ $init }}) ); - {{- if isset .Params "custommathjaxurl" }} + {{- if and (isset .Params "custommathjaxurl") .Params.customMathJaxURL }} - {{- else if isset .Site.Params "custommathjaxurl" }} + {{- else if and (isset .Site.Params "custommathjaxurl") .Site.Params.customMathJaxURL }} {{- else }} diff --git a/layouts/partials/dependencies/mermaid.html b/layouts/partials/dependencies/mermaid.html index 8dc42af60a..435bf870a8 100644 --- a/layouts/partials/dependencies/mermaid.html +++ b/layouts/partials/dependencies/mermaid.html @@ -10,9 +10,9 @@ - {{- if isset .Params "custommermaidurl" }} + {{- if and (isset .Params "custommermaidurl") .Params.customMermaidURL }} - {{- else if isset .Site.Params "custommermaidurl" }} + {{- else if and (isset .Site.Params "custommermaidurl") .Site.Params.customMermaidURL }} {{- else }} diff --git a/layouts/partials/dependencies/openapi.html b/layouts/partials/dependencies/openapi.html index 18dd29bd3a..bbf94eac32 100644 --- a/layouts/partials/dependencies/openapi.html +++ b/layouts/partials/dependencies/openapi.html @@ -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 }}