Skip to content

Commit

Permalink
site: robots.txt (kubernetes-sigs#524)
Browse files Browse the repository at this point in the history
Prevent Netlify preview environments from being indexed by search bots.

If HUGO_ENV!=production, we return Disallow:/

Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
  • Loading branch information
ahmetb committed Mar 1, 2020
1 parent 178d530 commit 2045542
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions site/config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
title: "Krew – kubectl plugin manager"
baseURL: "https://krew.sigs.k8s.io/"
languageCode: "en-us"
enableRobotsTXT: true
disableKinds:
- taxonomy
- taxonomyTerm
Expand Down
4 changes: 4 additions & 0 deletions site/layouts/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
User-agent: *
{{ if ne ( getenv "HUGO_ENV" ) "production" -}}
Disallow: /
{{- end -}}

0 comments on commit 2045542

Please sign in to comment.