mirror of
https://github.com/cotes2020/jekyll-theme-chirpy.git
synced 2025-12-18 05:41:31 +00:00
Fixed the PV cache.
This commit is contained in:
@@ -106,6 +106,6 @@ const include = [
|
||||
];
|
||||
|
||||
const exclude = [
|
||||
'/assets/js/data/pv-data.js',
|
||||
'/assets/js/data/pv-cache.js',
|
||||
'/img.shields.io/'
|
||||
];
|
||||
|
||||
11
assets/js/data/pv-cache.js
Normal file
11
assets/js/data/pv-cache.js
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
layout: compress
|
||||
---
|
||||
|
||||
{%- 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,9 +0,0 @@
|
||||
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 data/_pageviews.json %}
|
||||
{%- endif -%}
|
||||
{%- endcapture -%}
|
||||
|
||||
const pageviews = '{{ pv_data }}';
|
||||
Reference in New Issue
Block a user