From 7c5d6627725ee2fc8b1a0e1027b4f3bf9987d7a9 Mon Sep 17 00:00:00 2001 From: Pascal Precht Date: Thu, 14 Nov 2019 16:29:12 +0100 Subject: [PATCH] fix(@embark/site): ensure fathom script is only loaded in production environment --- site/deploy-site.js | 2 +- site/themes/embark/layout/layout.swig | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/site/deploy-site.js b/site/deploy-site.js index 85236f53f..3283e4a31 100644 --- a/site/deploy-site.js +++ b/site/deploy-site.js @@ -30,7 +30,7 @@ function main() { } console.log('Deploying website...'); process.chdir(SITE_DIR); - execWithOutput('npx hexo generate'); + execWithOutput('npx hexo generate --production'); try { execWithOutput('git branch -D embark-site-deploy'); } catch (e) { diff --git a/site/themes/embark/layout/layout.swig b/site/themes/embark/layout/layout.swig index 6ccecc751..0b920bd9e 100644 --- a/site/themes/embark/layout/layout.swig +++ b/site/themes/embark/layout/layout.swig @@ -13,6 +13,7 @@ }; + {% if env.args.production %} + {% endif %}