Building a Hakyll site in “development” or “release” mode

时间:2015-07-31 20:33:29

标签: haskell hakyll

I am building a site with Hakyll and I only want my Google Analytics code to be included if I am deploying the site, not when I’m just testing it using “site server”. Ideally I’d be able to write something like

$if(deploying)$
    <script src=".../whatever.js"></script>
$endif$

in a template and have that content included when I run “site build” but not “site server”. Does Hakyll have any built-in way to determine which subcommand is being run? Or can I somehow access the process’s environment variables?

0 个答案:

没有答案