Skip to content

Commit

Permalink
Revert 9225, fix indexing for k8s.io (kubernetes#9767)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenopis authored and k8s-ci-robot committed Aug 6, 2018
1 parent f7917d0 commit 4920a51
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 0 additions & 2 deletions layouts/index.headers
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{{- $cssFilesFromConfig := .Site.Params.pushAssets.css -}}
{{- $jsFilesFromConfig := .Site.Params.pushAssets.js -}}
{{- $pages := .Site.RegularPages -}}
/*
X-Robots-Tag: noindex
Link: </images/favicon.png>; rel=preload; as=image
{{- range $cssFilesFromConfig -}}
{{- $cssUrl := printf "/css/%s.css" . }}
Expand Down
9 changes: 8 additions & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[build]
# This default build command adds the robots noindex directive to the site headers.
# It is turned off ONLY for the `master` branch deployment on kubernetes.io
publish = "public"
command = "hugo"
command = "hugo --enableGitInfo && cp netlify_noindex_headers.txt public/_headers"

[build.environment]
HUGO_VERSION = "0.46"
Expand All @@ -15,3 +17,8 @@ command = "hugo --enableGitInfo -b $DEPLOY_PRIME_URL"

[context.branch-deploy]
command = "hugo --enableGitInfo -b $DEPLOY_PRIME_URL"

[context.master]
# This context is triggered by the master branch and allows search indexing
publish = "public"
command = "hugo"
3 changes: 3 additions & 0 deletions netlify_noindex_headers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Prevent bots from indexing site
/*
X-Robots-Tag: noindex

0 comments on commit 4920a51

Please sign in to comment.