Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXhmikosR <xhmikosr@gmail.com>2021-02-04 09:40:20 +0300
committerXhmikosR <xhmikosr@gmail.com>2021-08-31 17:24:38 +0300
commit283cbd902669732943885e94115a0e29a952baf6 (patch)
tree7e99f4cc70412ce453cc0a6aa529d5e6a50f4eee
parentf22966c9206cd3efba174566fecd6bd68061c4ae (diff)
Use `path.Join` when joining paths
-rw-r--r--site/content/docs/5.1/forms/validation.md2
-rw-r--r--site/layouts/partials/scripts.html2
-rw-r--r--site/layouts/partials/stylesheet.html2
-rw-r--r--site/layouts/shortcodes/docsref.html2
4 files changed, 4 insertions, 4 deletions
diff --git a/site/content/docs/5.1/forms/validation.md b/site/content/docs/5.1/forms/validation.md
index 81f8b73d2d..c4bc1b5db5 100644
--- a/site/content/docs/5.1/forms/validation.md
+++ b/site/content/docs/5.1/forms/validation.md
@@ -103,7 +103,7 @@ Custom feedback styles apply custom colors, borders, focus styles, and backgroun
{{< example lang="js" show_preview="false" >}}
{{< js.inline >}}
-{{- readFile (printf "site/static/docs/%s/assets/js/validate-forms.js" .Site.Params.docs_version) -}}
+{{- readFile (path.Join "site/static/docs" .Site.Params.docs_version "assets/js/validate-forms.js") -}}
{{< /js.inline >}}
{{< /example >}}
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) -}}