File tree Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -128,6 +128,8 @@ if [ "$BRANCH" = "lts" ]; then
128128 sed -i ' /^title = /s/ %branch%//' " $CONFIG_TOML "
129129 # Replace %branch% in searchBaseUrl with "lts"
130130 sed -i ' /^searchBaseUrl = /s/%branch%/lts/' " $CONFIG_TOML "
131+ # Set isLTS to true
132+ sed -i ' s/isLTS = false/isLTS = true/' " $CONFIG_TOML "
131133 # Then replace remaining %branch% with LTS_VERSION
132134 sed -i " s/%branch%/$LTS_VERSION /g" " $CONFIG_TOML "
133135else
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ repositoryUrl = "https://github.com/cfengine/documentation"
1515searchBaseUrl = " /docs/search/%branch%/"
1616searchUrlPrefix = " .."
1717domain = " docs.cfengine.com"
18+ isLTS = false
1819
1920[params .cfengine ]
2021branch = " %branch%"
Original file line number Diff line number Diff line change 1+ {{ if not .Site.Params.isLTS }}
2+ {{ $currentPath := .RelPermalink }}
3+ {{ $canonicalURL := replace $currentPath (printf "/docs/%s/" .Site.Params.branch) "/docs/lts/" }}
4+ < link rel ="canonical " href ="https://{{ .Site.Params.domain }}{{ $canonicalURL }} " />
5+ {{ end }}
You can’t perform that action at this time.
0 commit comments