Skip to content

Commit bec8ff1

Browse files
george-gcalzyang2000
authored andcommitted
Fixed liquid variables in some js files (alshedivat#3117)
Fixes alshedivat#3095 --------- Signed-off-by: George Araújo <[email protected]>
1 parent 7f1b971 commit bec8ff1

File tree

9 files changed

+24
-10
lines changed

9 files changed

+24
-10
lines changed

.github/workflows/deploy.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
paths:
99
- "assets/**"
1010
- "_sass/**"
11+
- "_scripts/**"
1112
- "**.bib"
1213
- "**.html"
1314
- "**.js"
@@ -36,6 +37,7 @@ on:
3637
paths:
3738
- "assets/**"
3839
- "_sass/**"
40+
- "_scripts/**"
3941
- "**.bib"
4042
- "**.html"
4143
- "**.js"

.prettierignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ lighthouse_results/**
99
_posts/2015-10-20-math.md
1010
_sass/font-awesome/*.scss
1111
_sass/tabler-icons/*.scss
12-
_scripts/search.liquid.js
12+
_scripts/*

_includes/distill_scripts.liquid

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,13 +195,13 @@
195195
<!-- Analytics -->
196196
<!-- Global site tag (gtag.js) - Google Analytics -->
197197
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script>
198-
<script defer src="{{ '/assets/js/google-analytics-setup.js' | relative_url | bust_file_cache }}"></script>
198+
<script defer src="{{ '/assets/js/google-analytics-setup.js' | relative_url }}"></script>
199199
{% endif %}
200200

201201
{% if site.enable_cronitor_analytics %}
202202
<!-- Cronitor RUM -->
203203
<script async src="https://rum.cronitor.io/script.js"></script>
204-
<script defer src="{{ '/assets/js/cronitor-analytics-setup.js' | relative_url | bust_file_cache }}"></script>
204+
<script defer src="{{ '/assets/js/cronitor-analytics-setup.js' | relative_url }}"></script>
205205
{% endif %}
206206
{% if site.enable_pirsch_analytics %}
207207
<script
@@ -212,7 +212,7 @@
212212
></script>
213213
{% endif %}
214214
{% if site.enable_openpanel_analytics %}
215-
<script defer src="{{ '/assets/js/open-panel-analytics-setup.js' | relative_url | bust_file_cache }}"></script>
215+
<script defer src="{{ '/assets/js/open-panel-analytics-setup.js' | relative_url }}"></script>
216216
<script async defer src="https://openpanel.dev/op1.js"></script>
217217
{% endif %}
218218

@@ -240,7 +240,7 @@
240240
></script>
241241
{% endif %}
242242
{% if page.images.photoswipe %}
243-
<script defer src="{{ '/assets/js/photoswipe-setup.js' | relative_url | bust_file_cache }}" type="module"></script>
243+
<script defer src="{{ '/assets/js/photoswipe-setup.js' | relative_url }}" type="module"></script>
244244
{% endif %}
245245
{% if page.images.slider %}
246246
<script

_includes/scripts.liquid

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -236,13 +236,13 @@
236236
237237
gtag('config', '{{ site.google_analytics }}');
238238
</script>
239-
<script defer src="{{ '/assets/js/google-analytics-setup.js' | relative_url | bust_file_cache }}"></script>
239+
<script defer src="{{ '/assets/js/google-analytics-setup.js' | relative_url }}"></script>
240240
{% endif %}
241241

242242
{% if site.enable_cronitor_analytics %}
243243
<!-- Cronitor RUM -->
244244
<script async src="https://rum.cronitor.io/script.js"></script>
245-
<script defer src="{{ '/assets/js/cronitor-analytics-setup.js' | relative_url | bust_file_cache }}"></script>
245+
<script defer src="{{ '/assets/js/cronitor-analytics-setup.js' | relative_url }}"></script>
246246
{% endif %}
247247
{% if site.enable_pirsch_analytics %}
248248
<script
@@ -253,7 +253,7 @@
253253
></script>
254254
{% endif %}
255255
{% if site.enable_openpanel_analytics %}
256-
<script defer src="{{ '/assets/js/open-panel-analytics-setup.js' | relative_url | bust_file_cache }}"></script>
256+
<script defer src="{{ '/assets/js/open-panel-analytics-setup.js' | relative_url }}"></script>
257257
<script async defer src="https://openpanel.dev/op1.js"></script>
258258
{% endif %}
259259

@@ -281,7 +281,7 @@
281281
></script>
282282
{% endif %}
283283
{% if page.images.photoswipe %}
284-
<script defer src="{{ '/assets/js/photoswipe-setup.js' | relative_url | bust_file_cache }}" type="module"></script>
284+
<script defer src="{{ '/assets/js/photoswipe-setup.js' | relative_url }}" type="module"></script>
285285
{% endif %}
286286
{% if page.images.slider %}
287287
<script

_layouts/bib.liquid

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080

8181
{%- if forloop.length > 1 -%}
8282
{% if forloop.first == false -%}
83-
{%- if forloop.length > 2 %}, {% elsif forloop.length == 2 %} {% endif %}
83+
{%- if forloop.length > 2 %}, {% elsif forloop.length == 2 %} {% endif %}
8484
{%- endif %}
8585
{%- if forloop.last and author_array_limit == author_array_size %}and {% endif -%}
8686
{% endif %}

assets/js/cronitor-analytics-setup.js renamed to _scripts/cronitor-analytics-setup.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
---
2+
permalink: /assets/js/cronitor-analytics-setup.js
3+
---
14
window.cronitor =
25
window.cronitor ||
36
function () {

assets/js/google-analytics-setup.js renamed to _scripts/google-analytics-setup.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
---
2+
permalink: /assets/js/google-analytics-setup.js
3+
---
14
window.dataLayer = window.dataLayer || [];
25
function gtag() {
36
window.dataLayer.push(arguments);

assets/js/open-panel-analytics-setup.js renamed to _scripts/open-panel-analytics-setup.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
---
2+
permalink: /assets/js/open-panel-analytics-setup.js
3+
---
14
window.op =
25
window.op ||
36
function (...args) {

assets/js/photoswipe-setup.js renamed to _scripts/photoswipe-setup.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
---
2+
permalink: /assets/js/photoswipe-setup.js
3+
---
14
import PhotoSwipeLightbox from "{{ site.third_party_libraries.photoswipe-lightbox.url.js }}";
25
import PhotoSwipe from "{{ site.third_party_libraries.photoswipe.url.js }}";
36
const photoswipe = new PhotoSwipeLightbox({

0 commit comments

Comments
 (0)