Skip to content

Commit eceaf05

Browse files
committed
Make configuration more flexible.
1 parent 3ecf14c commit eceaf05

3 files changed

Lines changed: 10 additions & 5 deletions

File tree

_config.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,11 @@ google_analytics:
4747
# The Google Analytics pageviews switch.
4848
# DO NOT enable it unless you know how to deploy the Google Analytics superProxy.
4949
pv: false
50-
# superProxy Url, only valid when `google_analytics.pv` is set to 'true'
50+
# superProxy baseURL and URL, only valid when `google_analytics.pv` is set to 'true'
51+
proxy_baseurl: ''
5152
proxy_url: ''
5253

54+
5355
disqus:
5456
shortname: 'disqus' # Change to your Disqus shortname. › https://help.disqus.com/en/articles/1717111-what-s-a-shortname
5557
comments: true # boolean type, the global switch for posts comments.

_includes/head.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131
<link rel="preconnect" href="https://www.googletagmanager.com" crossorigin="anonymous">
3232
<link rel="dns-prefetch" href="https://www.googletagmanager.com">
3333

34-
{% if site.google_analytics.proxy_url and site.google_analytics.pv %}
35-
<link rel="preconnect" href="{{ site.google_analytics.proxy_url }}" crossorigin="use-credentials">
36-
<link rel="dns-prefetch" href="{{ site.google_analytics.proxy_url }}">
34+
{% if site.google_analytics.proxy_baseurl and site.google_analytics.pv %}
35+
<link rel="preconnect" href="{{ site.google_analytics.proxy_baseurl }}" crossorigin="use-credentials">
36+
<link rel="dns-prefetch" href="{{ site.google_analytics.proxy_baseurl }}">
3737
{% endif %}
3838
{% endif %}
3939

assets/data/proxy.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
{"proxyUrl":"https://your-gae.appspot.com/query?id=the_secrt_id"}
1+
---
2+
---
3+
4+
{"proxyUrl":"{{ site.google_analytics.proxy_url }}"}

0 commit comments

Comments
 (0)