diff --git a/site/layouts/partials/home/masthead.html b/site/layouts/partials/home/masthead.html index 3fad86bcc9..beb00ec98b 100644 --- a/site/layouts/partials/home/masthead.html +++ b/site/layouts/partials/home/masthead.html @@ -18,6 +18,6 @@
- {{ partial "ads.html" . }} + {{ partial "ads" . }} diff --git a/site/layouts/partials/scripts.html b/site/layouts/partials/scripts.html index 9b05f24f01..19ac0c2eb7 100644 --- a/site/layouts/partials/scripts.html +++ b/site/layouts/partials/scripts.html @@ -13,7 +13,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 8013e6f9d9..d34604424c 100644 --- a/site/layouts/partials/stylesheet.html +++ b/site/layouts/partials/stylesheet.html @@ -11,7 +11,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/callout.html b/site/layouts/shortcodes/callout.html index 007f8a8e8e..86683ecf4c 100644 --- a/site/layouts/shortcodes/callout.html +++ b/site/layouts/shortcodes/callout.html @@ -1,6 +1,5 @@ {{- /* - Usage: `callout "type"`, - where type is one of info (default), danger, warning + Usage: `callout "type"`, where `type` is one of info (default), danger, or warning */ -}} {{- $css_class := .Get 0 | default "info" -}} 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) -}} diff --git a/site/layouts/shortcodes/example.html b/site/layouts/shortcodes/example.html index fd20839cbe..0592adc6b5 100644 --- a/site/layouts/shortcodes/example.html +++ b/site/layouts/shortcodes/example.html @@ -1,26 +1,28 @@ {{- /* - Usage: `example [args]` + Usage: `example args` - `args` are optional and can be one of the following: - id: the `div`'s id - default: "" - class: any extra class(es) to be added to the `div` - default "" - show_preview: if the preview should be output in the HTML - default: `true` - show_markup: if the markup should be output in the HTML - default: `true` + `args` are all optional and can be one of the following: + * id: the `div`'s id - default: "" + * class: any extra class(es) to be added to the `div` - default: "" + * show_preview: if the preview should be output in the HTML - default: `true` + * show_markup: if the markup should be output in the HTML - default: `true` */ -}} +{{- $id := .Get "id" -}} +{{- $class := .Get "class" -}} {{- $lang := .Get "lang" | default "html" -}} {{- $show_preview := .Get "show_preview" | default true -}} {{- $show_markup := .Get "show_markup" | default true -}} {{- $input := .Inner -}} {{- if eq $show_preview true -}} -