From 283cbd902669732943885e94115a0e29a952baf6 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Thu, 4 Feb 2021 08:40:20 +0200 Subject: Use `path.Join` when joining paths --- site/layouts/partials/scripts.html | 2 +- site/layouts/partials/stylesheet.html | 2 +- site/layouts/shortcodes/docsref.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'site/layouts') diff --git a/site/layouts/partials/scripts.html b/site/layouts/partials/scripts.html index d7c6946417..d25add3ff4 100644 --- a/site/layouts/partials/scripts.html +++ b/site/layouts/partials/scripts.html @@ -10,7 +10,7 @@ {{- $vendor := resources.Match "js/vendor/*.js" -}} {{- $js := resources.Match "js/*.js" -}} -{{- $targetDocsJSPath := printf "/docs/%s/assets/js/docs.js" .Site.Params.docs_version -}} +{{- $targetDocsJSPath := path.Join "/docs" .Site.Params.docs_version "assets/js/docs.js" -}} {{- $docsJs := append $js $vendor | resources.Concat $targetDocsJSPath -}} {{- if eq hugo.Environment "production" -}} diff --git a/site/layouts/partials/stylesheet.html b/site/layouts/partials/stylesheet.html index 83b30f452a..cc44733836 100644 --- a/site/layouts/partials/stylesheet.html +++ b/site/layouts/partials/stylesheet.html @@ -10,7 +10,7 @@ {{- end }} {{- if (ne .Page.Layout "examples") }} -{{- $targetDocsCssPath := printf "/docs/%s/assets/css/docs.css" .Site.Params.docs_version -}} +{{- $targetDocsCssPath := path.Join "/docs" .Site.Params.docs_version "assets/css/docs.css" -}} {{- $sassOptions := dict "targetPath" $targetDocsCssPath "outputStyle" "expanded" "precision" 6 -}} {{- $postcssOptions := dict "use" "autoprefixer" "noMap" true -}} diff --git a/site/layouts/shortcodes/docsref.html b/site/layouts/shortcodes/docsref.html index 88e43d1725..2379de2b12 100644 --- a/site/layouts/shortcodes/docsref.html +++ b/site/layouts/shortcodes/docsref.html @@ -1 +1 @@ -{{- relref . ((printf "docs/%s%s" $.Site.Params.docs_version (.Get 0)) | relURL) -}} +{{- relref . ((path.Join "docs" $.Site.Params.docs_version (.Get 0)) | relURL) -}} -- cgit v1.2.3