diff --git a/_config.yml b/_config.yml index 02d872e..59b7dce 100644 --- a/_config.yml +++ b/_config.yml @@ -42,11 +42,13 @@ google_site_verification: google_meta_tag_verification # change to your verifica timezone: Asia/Shanghai google_analytics: - # Change to your Google Analytics ID - id: 'UA-*********-*' + # Fill with your Google Analytics ID + id: '' # The Google Analytics pageviews switch. # DO NOT enable it unless you know how to deploy the Google Analytics superProxy. pv: false + # superProxy Url, only valid when `google_analytics.pv` is set to 'true' + proxy_url: '' disqus: shortname: 'disqus' # Change to your Disqus shortname. diff --git a/_includes/head.html b/_includes/head.html index dc80e12..984de23 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -19,6 +19,27 @@ {% include favicons.html %} + + + + + + {% if jekyll.environment == 'production' %} + + + + + + + {% if site.google_analytics.proxy_url and site.google_analytics.pv %} + + + {% endif %} + {% endif %} + + + + @@ -55,25 +76,21 @@ integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"> + integrity="sha256-fTuUgtT7O2rqoImwjrhDgbXTKUwyxxujIMRIK7TbuNU=" crossorigin="anonymous" async> + integrity="sha256-5+02zu5UULQkO7w1GIr6vftCgMfFdZcAHeDtFnKZsBs=" crossorigin="anonymous" async> - {% if jekyll.environment == 'production' %} - {% include google-analytics.html %} - {% endif %} - {% if page.layout == 'home' or page.layout == 'post' %} - + {% if site.google_analytics.pv %} diff --git a/_layouts/default.html b/_layouts/default.html index 1cf913e..e59504a 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -17,7 +17,6 @@ layout: compress