1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-12-18 05:41:31 +00:00

Improved the PV fetching.

Discard some of the old permalink PV records.
This commit is contained in:
Cotes Chung
2020-07-12 22:59:05 +08:00
parent 313c44f238
commit c0ba181246
6 changed files with 61 additions and 73 deletions

View File

@@ -106,6 +106,9 @@ const include = [
];
const exclude = [
'/assets/js/data/pv-cache.js',
{%- if site.google_analytics.pv.proxy_url and site.google_analytics.pv.enabled -%}
'{{ site.google_analytics.pv.proxy_url }}',
{%- endif -%}
'/assets/js/data/pageviews.json',
'/img.shields.io/'
];

View File

@@ -1,11 +0,0 @@
---
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 }}';