From 72a3d65ac0750bae180defc201a97bc78b073ef6 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Fri, 8 Jan 2016 13:01:21 +0100 Subject: [PATCH] prevent search engine indexing of all non-production builds, ref #3 --- _src/_includes/head.html | 6 +++--- gulpfile.js | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/_src/_includes/head.html b/_src/_includes/head.html index dd287ba..6ea598b 100644 --- a/_src/_includes/head.html +++ b/_src/_includes/head.html @@ -57,9 +57,9 @@ {% include twittercards.html %} - - {% if page.sitemap == false %} - + + {% if jekyll.environment != 'production' or page.sitemap == false %} + {% endif %} diff --git a/gulpfile.js b/gulpfile.js index e0c789e..a859d82 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -115,6 +115,7 @@ gulp.task('jekyll', function(cb) { process.env.JEKYLL_ENV = 'production'; var jekyll = spawn('bundle', ['exec', 'jekyll', 'build'], { stdio: 'inherit' }); } else { + process.env.JEKYLL_ENV = 'development'; var jekyll = spawn('bundle', ['exec', 'jekyll', 'build', '--incremental', '--drafts', '--future'], { stdio: 'inherit' }); }