From eda181dec4805ed9c274b0f9a559276e474c2d1d Mon Sep 17 00:00:00 2001 From: Andrew Chen Date: Tue, 19 Jun 2018 15:22:32 -0700 Subject: [PATCH] Set noindex header for builds except for master (+1 squashed commit) (#9150) Squashed commits: [c87129c] Set noindex header for builds except for master --- netlify.toml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/netlify.toml b/netlify.toml index 3eec8fbd74..904f6956c9 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,6 +1,7 @@ [build] +# This default build command adds the robots noindex directive to the site headers publish = "public" -command = "hugo" +command = "hugo && cp netlify_noindex_headers.txt public/_headers" [context.production.environment] HUGO_BASEURL = "https://kubernetes.io/" @@ -20,3 +21,7 @@ command = "hugo -b $DEPLOY_PRIME_URL" [context.branch-deploy.environment] HUGO_VERSION = "0.40.3" +[context.master] +# This context is triggered by the master branch and allows search indexing +publish = "public" +command = "hugo"