Fixed liquid variables in some js files (#3117)

Fixes #3095

---------

Signed-off-by: George Araújo <george.gcac@gmail.com>
This commit is contained in:
George 2025-04-09 11:36:16 -03:00 committed by GitHub
parent fea4b7c550
commit 351dcb985e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 24 additions and 10 deletions

View File

@ -8,6 +8,7 @@ on:
paths:
- "assets/**"
- "_sass/**"
- "_scripts/**"
- "**.bib"
- "**.html"
- "**.js"
@ -36,6 +37,7 @@ on:
paths:
- "assets/**"
- "_sass/**"
- "_scripts/**"
- "**.bib"
- "**.html"
- "**.js"

View File

@ -9,4 +9,4 @@ lighthouse_results/**
_posts/2015-10-20-math.md
_sass/font-awesome/*.scss
_sass/tabler-icons/*.scss
_scripts/search.liquid.js
_scripts/*

View File

@ -195,13 +195,13 @@
<!-- Analytics -->
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script>
<script defer src="{{ '/assets/js/google-analytics-setup.js' | relative_url | bust_file_cache }}"></script>
<script defer src="{{ '/assets/js/google-analytics-setup.js' | relative_url }}"></script>
{% endif %}
{% if site.enable_cronitor_analytics %}
<!-- Cronitor RUM -->
<script async src="https://rum.cronitor.io/script.js"></script>
<script defer src="{{ '/assets/js/cronitor-analytics-setup.js' | relative_url | bust_file_cache }}"></script>
<script defer src="{{ '/assets/js/cronitor-analytics-setup.js' | relative_url }}"></script>
{% endif %}
{% if site.enable_pirsch_analytics %}
<script
@ -212,7 +212,7 @@
></script>
{% endif %}
{% if site.enable_openpanel_analytics %}
<script defer src="{{ '/assets/js/open-panel-analytics-setup.js' | relative_url | bust_file_cache }}"></script>
<script defer src="{{ '/assets/js/open-panel-analytics-setup.js' | relative_url }}"></script>
<script async defer src="https://openpanel.dev/op1.js"></script>
{% endif %}
@ -240,7 +240,7 @@
></script>
{% endif %}
{% if page.images.photoswipe %}
<script defer src="{{ '/assets/js/photoswipe-setup.js' | relative_url | bust_file_cache }}" type="module"></script>
<script defer src="{{ '/assets/js/photoswipe-setup.js' | relative_url }}" type="module"></script>
{% endif %}
{% if page.images.slider %}
<script

View File

@ -236,13 +236,13 @@
gtag('config', '{{ site.google_analytics }}');
</script>
<script defer src="{{ '/assets/js/google-analytics-setup.js' | relative_url | bust_file_cache }}"></script>
<script defer src="{{ '/assets/js/google-analytics-setup.js' | relative_url }}"></script>
{% endif %}
{% if site.enable_cronitor_analytics %}
<!-- Cronitor RUM -->
<script async src="https://rum.cronitor.io/script.js"></script>
<script defer src="{{ '/assets/js/cronitor-analytics-setup.js' | relative_url | bust_file_cache }}"></script>
<script defer src="{{ '/assets/js/cronitor-analytics-setup.js' | relative_url }}"></script>
{% endif %}
{% if site.enable_pirsch_analytics %}
<script
@ -253,7 +253,7 @@
></script>
{% endif %}
{% if site.enable_openpanel_analytics %}
<script defer src="{{ '/assets/js/open-panel-analytics-setup.js' | relative_url | bust_file_cache }}"></script>
<script defer src="{{ '/assets/js/open-panel-analytics-setup.js' | relative_url }}"></script>
<script async defer src="https://openpanel.dev/op1.js"></script>
{% endif %}
@ -281,7 +281,7 @@
></script>
{% endif %}
{% if page.images.photoswipe %}
<script defer src="{{ '/assets/js/photoswipe-setup.js' | relative_url | bust_file_cache }}" type="module"></script>
<script defer src="{{ '/assets/js/photoswipe-setup.js' | relative_url }}" type="module"></script>
{% endif %}
{% if page.images.slider %}
<script

View File

@ -80,7 +80,7 @@
{%- if forloop.length > 1 -%}
{% if forloop.first == false -%}
{%- if forloop.length > 2 %}, {% elsif forloop.length == 2 %} {% endif %}
{%- if forloop.length > 2 %}, {% elsif forloop.length == 2 %} {% endif %}
{%- endif %}
{%- if forloop.last and author_array_limit == author_array_size %}and {% endif -%}
{% endif %}

View File

@ -1,3 +1,6 @@
---
permalink: /assets/js/cronitor-analytics-setup.js
---
window.cronitor =
window.cronitor ||
function () {

View File

@ -1,3 +1,6 @@
---
permalink: /assets/js/google-analytics-setup.js
---
window.dataLayer = window.dataLayer || [];
function gtag() {
window.dataLayer.push(arguments);

View File

@ -1,3 +1,6 @@
---
permalink: /assets/js/open-panel-analytics-setup.js
---
window.op =
window.op ||
function (...args) {

View File

@ -1,3 +1,6 @@
---
permalink: /assets/js/photoswipe-setup.js
---
import PhotoSwipeLightbox from "{{ site.third_party_libraries.photoswipe-lightbox.url.js }}";
import PhotoSwipe from "{{ site.third_party_libraries.photoswipe.url.js }}";
const photoswipe = new PhotoSwipeLightbox({