diff --git a/config/_default/params.yaml b/config/_default/params.yaml index c689a0c07..7d2d23494 100644 --- a/config/_default/params.yaml +++ b/config/_default/params.yaml @@ -1,3 +1,6 @@ +ProductionURLs: + - 'https://docs.atsign.com/' + # Theme Color for Chrome Browser themeColor: '#fff' diff --git a/layouts/docs/codelab.html b/layouts/docs/codelab.html index cf38cf342..71b821e52 100644 --- a/layouts/docs/codelab.html +++ b/layouts/docs/codelab.html @@ -1,7 +1,7 @@ {{ define "main" }} {{ $section := .CurrentSection }} {{ $page := .Page }} {{ .Scratch.Set "class" "codelab" }} {{ if eq .CurrentSection.Params.layout "codelab-list" }} - {{ if ne (.Site.BaseURL) "https://docs.atsign.com" -}} + {{ if not (in .Site.Params.ProductionURLs (string .Site.BaseURL)) -}} {{ $options := (dict "targetPath" "codelab.css" "enableSourceMap" true "includePaths" (slice "node_modules")) -}} {{ $css := resources.Get "scss/codelab.scss" | toCSS $options -}} diff --git a/layouts/partials/footer/script-footer.html b/layouts/partials/footer/script-footer.html index b233e6703..8b3c674ad 100644 --- a/layouts/partials/footer/script-footer.html +++ b/layouts/partials/footer/script-footer.html @@ -62,7 +62,7 @@ {{ $js := $slice | resources.Concat "main.js" -}} -{{ if ne (.Site.BaseURL) "https://docs.atsign.com" -}} +{{ if not (in .Site.Params.ProductionURLs (string .Site.BaseURL)) -}} {{ if .Site.Params.options.bootStrapJs -}} {{ end -}} diff --git a/layouts/partials/head/script-header.html b/layouts/partials/head/script-header.html index 27985d295..d4515dc04 100644 --- a/layouts/partials/head/script-header.html +++ b/layouts/partials/head/script-header.html @@ -6,7 +6,7 @@ {{ $alertInit := resources.Get "js/alert-init.js" | js.Build | minify -}} {{- end -}} -{{ if eq (.Site.BaseURL) "https://docs.atsign.com" -}} +{{ if in .Site.Params.ProductionURLs (string .Site.BaseURL) -}} {{ $matomo := resources.Get "js/matomo.js" | js.Build | minify -}} {{ end -}} \ No newline at end of file diff --git a/layouts/robots.txt b/layouts/robots.txt index 3caaaab20..e9a6e66e2 100644 --- a/layouts/robots.txt +++ b/layouts/robots.txt @@ -1,5 +1,5 @@ User-agent: * -{{ if eq (.Site.BaseURL) "https://docs.atsign.com" -}} +{{ if in .Site.Params.ProductionURLs (string .Site.BaseURL) -}} Allow: / {{ else -}} Disallow: / diff --git a/layouts_docs/_default/codelab.html b/layouts_docs/_default/codelab.html index cf38cf342..71b821e52 100644 --- a/layouts_docs/_default/codelab.html +++ b/layouts_docs/_default/codelab.html @@ -1,7 +1,7 @@ {{ define "main" }} {{ $section := .CurrentSection }} {{ $page := .Page }} {{ .Scratch.Set "class" "codelab" }} {{ if eq .CurrentSection.Params.layout "codelab-list" }} - {{ if ne (.Site.BaseURL) "https://docs.atsign.com" -}} + {{ if not (in .Site.Params.ProductionURLs (string .Site.BaseURL)) -}} {{ $options := (dict "targetPath" "codelab.css" "enableSourceMap" true "includePaths" (slice "node_modules")) -}} {{ $css := resources.Get "scss/codelab.scss" | toCSS $options -}}