mirror of
https://github.com/cotes2020/jekyll-theme-chirpy.git
synced 2025-12-18 05:41:31 +00:00
Improved the PV fetching experience.
This commit is contained in:
@@ -1,6 +0,0 @@
|
||||
---
|
||||
---
|
||||
|
||||
{
|
||||
"proxyUrl": "{{ site.google_analytics.proxy_url }}"
|
||||
}
|
||||
13
assets/data/pv-data.json
Normal file
13
assets/data/pv-data.json
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
layout: compress
|
||||
---
|
||||
|
||||
const proxyData = '{"url": "{{ site.google_analytics.pv.proxy_endpoint }}"}';
|
||||
|
||||
{%- capture pv_data -%}
|
||||
{%- if site.google_analytics.pv.cache and site.google_analytics.pv.enabled -%}
|
||||
{% include_relative pageviews.json %}
|
||||
{%- endif -%}
|
||||
{%- endcapture -%}
|
||||
|
||||
const pageviews = '{{ pv_data }}';
|
||||
@@ -1,4 +1,5 @@
|
||||
---
|
||||
layout: compress
|
||||
---
|
||||
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user