mirror of https://github.com/embarklabs/embark.git
fix(@embark/site): ensure fathom script is only loaded in production environment
This commit is contained in:
parent
92c5062e3e
commit
7c5d662772
|
@ -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) {
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
};
|
||||
</script>
|
||||
|
||||
{% if env.args.production %}
|
||||
<!-- Fathom - simple website analytics - https://github.com/usefathom/fathom -->
|
||||
<script>
|
||||
(function(f, a, t, h, o, m){
|
||||
|
@ -26,6 +27,7 @@
|
|||
fathom('trackPageview');
|
||||
</script>
|
||||
<!-- / Fathom -->
|
||||
{% endif %}
|
||||
|
||||
<script src="/js/index.js"></script>
|
||||
|
||||
|
|
Loading…
Reference in New Issue