Skip to content

Instantly share code, notes, and snippets.

@Convincible
Forked from budparr/robots.txt
Last active October 17, 2017 20:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Convincible/e06659925b45cabcd1ceabbb36dc8de8 to your computer and use it in GitHub Desktop.
Save Convincible/e06659925b45cabcd1ceabbb36dc8de8 to your computer and use it in GitHub Desktop.
Robots.txt to exclude dev/staging/non-production environments
---
layout: null
---
User-agent: *
Disallow: {% if jekyll.environment != 'production' %}/{% endif %}
@Convincible
Copy link
Author

Convincible commented Oct 17, 2017

Stripped back to its simplest form.

Ensure production environments build with:

JEKYLL_ENV=production jekyll build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment