diff --git a/docs-site/go.mod b/docs-site/go.mod index 4aeeb135..429204ed 100644 --- a/docs-site/go.mod +++ b/docs-site/go.mod @@ -4,5 +4,5 @@ go 1.21 require ( github.com/imfing/hextra v0.12.3 // indirect - github.com/solo-io/docs-theme-extras v0.3.16 // indirect + github.com/solo-io/docs-theme-extras v0.3.17 // indirect ) diff --git a/docs-site/go.sum b/docs-site/go.sum index b4dbb5c2..33241215 100644 --- a/docs-site/go.sum +++ b/docs-site/go.sum @@ -2,3 +2,7 @@ github.com/imfing/hextra v0.12.3 h1:DZHY2rUWYteyzjlHi9r4n7Bb5e2Q+6LXe4C1Dqn0ZjM= github.com/imfing/hextra v0.12.3/go.mod h1:vi+yhpq8YPp/aghvJlNKVnJKcPJ/VyAEcfC1BSV9ARo= github.com/solo-io/docs-theme-extras v0.3.16 h1:lPSS9awzzgeD39h32v3gEISlerOr0rEwi+QW3yy7b3A= github.com/solo-io/docs-theme-extras v0.3.16/go.mod h1:jjjYu/QoD+vMu30zgcpfEuTEGuJOJWs5qai/K18kltg= +github.com/solo-io/docs-theme-extras v0.3.17-beta.1 h1:d4uoaQqdvx2IZOSjKV9TgtFjIUPwivVDGyqsO4Y34Ko= +github.com/solo-io/docs-theme-extras v0.3.17-beta.1/go.mod h1:jjjYu/QoD+vMu30zgcpfEuTEGuJOJWs5qai/K18kltg= +github.com/solo-io/docs-theme-extras v0.3.17 h1:SSfI0zexM1ac3XMKkj4em22lRZkjF+8C/0uXkSjaXp0= +github.com/solo-io/docs-theme-extras v0.3.17/go.mod h1:jjjYu/QoD+vMu30zgcpfEuTEGuJOJWs5qai/K18kltg= diff --git a/docs-site/layouts/partials/utils/version-noindex.html b/docs-site/layouts/partials/utils/version-noindex.html index 1580ca94..dca6dea1 100644 --- a/docs-site/layouts/partials/utils/version-noindex.html +++ b/docs-site/layouts/partials/utils/version-noindex.html @@ -29,10 +29,17 @@ entry while 1.0 is in beta, so today that spares every 1.x page the 0.x tree has no counterpart for. + Like upstream, this RETURNS a directive string ("noindex, follow" or "") + and emits no markup: the module's _partials/head.html folds the result + into the one robots tag it writes. Printing a tag here instead + puts that markup inside head.html's content attribute, which renders as + an empty `content` on exactly the pages that should be noindexed. + Re-check this against the pinned module on any docs-theme-extras bump: if upstream learns to resolve a baseURL path prefix itself, this override should be deleted rather than left to rot. */ -}} +{{- $directive := "" -}} {{- $root := partial "utils/version-root.html" . -}} {{- with partial "utils/resolve-section-versions.html" $root.section -}} {{- /* The current version's URL segment. `latest = true` is the only signal @@ -58,7 +65,8 @@ {{- end -}} {{- if site.GetPage $latestEquiv -}} - + {{- $directive = "noindex, follow" -}} {{- end -}} {{- end -}} {{- end -}} +{{- return $directive -}}