aboutsummaryrefslogtreecommitdiffstats
path: root/pelican-bootstrap3/templates/includes
diff options
context:
space:
mode:
Diffstat (limited to 'pelican-bootstrap3/templates/includes')
-rw-r--r--pelican-bootstrap3/templates/includes/article_info.html3
-rw-r--r--pelican-bootstrap3/templates/includes/ga.html26
2 files changed, 16 insertions, 13 deletions
diff --git a/pelican-bootstrap3/templates/includes/article_info.html b/pelican-bootstrap3/templates/includes/article_info.html
index 1cb85d5..8ff2d12 100644
--- a/pelican-bootstrap3/templates/includes/article_info.html
+++ b/pelican-bootstrap3/templates/includes/article_info.html
@@ -1,4 +1,7 @@
<footer class="post-info">
+ {% if article.readtime %}
+ <span class="label label-success">{{article.readtime.minutes}} min. read</span>
+ {% endif %}
<span class="label label-default">Date</span>
<span class="published">
<i class="fa fa-calendar"></i><time datetime="{{ article.date.isoformat() }}"> {{ article.locale_date }}</time>
diff --git a/pelican-bootstrap3/templates/includes/ga.html b/pelican-bootstrap3/templates/includes/ga.html
index 8663e73..c0c3425 100644
--- a/pelican-bootstrap3/templates/includes/ga.html
+++ b/pelican-bootstrap3/templates/includes/ga.html
@@ -1,21 +1,21 @@
{% if GOOGLE_ANALYTICS %}
<!-- Google Analytics -->
- <script type="text/javascript">
-
- var _gaq = _gaq || [];
- _gaq.push(['_setAccount', '{{ GOOGLE_ANALYTICS }}']);
- _gaq.push(['_trackPageview']);
+ <script async src="https://www.googletagmanager.com/gtag/js?id={{ GOOGLE_ANALYTICS }}"></script>
+ <script>
+ window.dataLayer = window.dataLayer || [];
+ function gtag(){dataLayer.push(arguments);}
+ gtag('js', new Date());
- (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);
- })();
+ gtag('config', {{ GOOGLE_ANALYTICS }});
</script>
<!-- End Google Analytics Code -->
+ <!-- Google Tag Manager -->
+ <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
+ new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
+ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
+ 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
+ })(window,document,'script','dataLayer','{{ GA_GTM_CONTAINER_ID }}');</script>
+ <!-- End Google Tag Manager -->
{% endif %}
{% if GOOGLE_ANALYTICS_UNIVERSAL %}
<!-- Google Analytics Universal -->