mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-27 09:43:06 +00:00
theme: make creation of generator meta tag configurable #383
This commit is contained in:
parent
d2d7d808a0
commit
55822e8741
2 changed files with 8 additions and 4 deletions
|
@ -36,6 +36,8 @@ Note that some of these parameters are explained in details in other sections of
|
||||||
# Javascript and CSS cache are automatically busted when new version of site is generated.
|
# Javascript and CSS cache are automatically busted when new version of site is generated.
|
||||||
# Set this to true to disable this behavior (some proxies don't handle well this optimization)
|
# Set this to true to disable this behavior (some proxies don't handle well this optimization)
|
||||||
disableAssetsBusting = false
|
disableAssetsBusting = false
|
||||||
|
# Set this to true if you want to disable generation for generator version meta tags of hugo and the theme
|
||||||
|
disableGeneratorVersion = false
|
||||||
# Set this to true to disable copy-to-clipboard button for inline code.
|
# Set this to true to disable copy-to-clipboard button for inline code.
|
||||||
disableInlineCopyToClipBoard = false
|
disableInlineCopyToClipBoard = false
|
||||||
# A title for shortcuts in menu is set by default. Set this to true to disable it.
|
# A title for shortcuts in menu is set by default. Set this to true to disable it.
|
||||||
|
|
|
@ -2,12 +2,14 @@
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
{{- $c:=""}}{{/* to avoid that user swiping to the left leaves a gap on the right side, we set minimum-scale, even if not advised to */}}
|
{{- $c:=""}}{{/* to avoid that user swiping to the left leaves a gap on the right side, we set minimum-scale, even if not advised to */}}
|
||||||
<meta name="viewport" content="height=device-height, width=device-width, initial-scale=1.0, minimum-scale=1.0">
|
<meta name="viewport" content="height=device-height, width=device-width, initial-scale=1.0, minimum-scale=1.0">
|
||||||
{{- $gen := hugo.Generator }}
|
{{- if (ne .Site.Params.disableGeneratorVersion true) }}
|
||||||
{{- $gen = replaceRE "\\s*/>$" ">" $gen }}
|
{{- $gen := hugo.Generator }}
|
||||||
|
{{- $gen = replaceRE "\\s*/>$" ">" $gen }}
|
||||||
{{ $gen | safeHTML }}
|
{{ $gen | safeHTML }}
|
||||||
{{- $ver := partial "version.txt" }}
|
{{- $ver := partial "version.txt" }}
|
||||||
{{- $ver := printf "<meta name=\"generator\" content=\"%s %s\">" "Relearn" $ver }}
|
{{- $ver := printf "<meta name=\"generator\" content=\"%s %s\">" "Relearn" $ver }}
|
||||||
{{ $ver | safeHTML }}
|
{{ $ver | safeHTML }}
|
||||||
|
{{- end }}
|
||||||
{{- if not (and .Title (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableSeoHiddenPages true) ) ) }}
|
{{- if not (and .Title (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableSeoHiddenPages true) ) ) }}
|
||||||
<meta name="robots" content="noindex, nofollow, noarchive, noimageindex">
|
<meta name="robots" content="noindex, nofollow, noarchive, noimageindex">
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
Loading…
Reference in a new issue