我使用 pelican-quickstart 创建了一个静态网站,它带有默认的 pelicanconf 和 publishconf。我的 publishconf 中有一个 GOOGLE_ANALYTICS 变量,但是当我在 Github Pages 中发布我的静态页面时,使用以下代码段:
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', '{{ GOOGLE_ANALYTICS }}']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
, _setAccount 变为空字符串。
我应该将 GOOGLE_ANALYTICS 从 publishconf 移动到 pelicanconf 吗?他们之间有什么区别?