From 1f8bfdf2571ec908b65122aa88c940f841939a46 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Thu, 19 Dec 2019 03:33:43 +0800 Subject: [PATCH] Make configuration more flexible. --- _config.yml | 4 +++- _includes/head.html | 6 +++--- assets/data/proxy.json | 5 ++++- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/_config.yml b/_config.yml index 18254bc..604bcb8 100644 --- a/_config.yml +++ b/_config.yml @@ -47,9 +47,11 @@ google_analytics: # 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' + # superProxy baseURL and URL, only valid when `google_analytics.pv` is set to 'true' + proxy_baseurl: '' proxy_url: '' + disqus: shortname: 'disqus' # Change to your Disqus shortname. › https://help.disqus.com/en/articles/1717111-what-s-a-shortname comments: true # boolean type, the global switch for posts comments. diff --git a/_includes/head.html b/_includes/head.html index 272259d..a774ac2 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -31,9 +31,9 @@ - {% if site.google_analytics.proxy_url and site.google_analytics.pv %} - - + {% if site.google_analytics.proxy_baseurl and site.google_analytics.pv %} + + {% endif %} {% endif %} diff --git a/assets/data/proxy.json b/assets/data/proxy.json index d84ebdd..897ed13 100644 --- a/assets/data/proxy.json +++ b/assets/data/proxy.json @@ -1 +1,4 @@ -{"proxyUrl":"https://your-gae.appspot.com/query?id=the_secrt_id"} \ No newline at end of file +--- +--- + +{"proxyUrl":"{{ site.google_analytics.proxy_url }}"} \ No newline at end of file