forked from cotes2020/jekyll-theme-chirpy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjs-selector.html
34 lines (27 loc) · 903 Bytes
/
js-selector.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<!--
JS selector for site.
Chirpy v2.3
https://github.com/cotes2020/jekyll-theme-chirpy
© 2020 Cotes Chung
MIT Licensed
-->
{% if page.layout == 'home' or page.layout == 'post' or page.layout == 'categories' %}
{% assign js = page.layout %}
{% else %}
{% assign js = "page" %}
{% endif %}
{% assign js_src = js | prepend: '/assets/js/' | append: '.min.js' | relative_url %}
<script async src="{{ js_src }}"></script>
{% if page.math %}
<!-- MathJax -->
<script defer src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script defer src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
{% endif %}
{% if jekyll.environment == 'production' %}
<!-- PWA -->
<script defer src="{{ '/app.js' | relative_url }}"></script>
<!-- GA -->
{% if site.google_analytics.id %}
{% include google-analytics.html %}
{% endif %}
{% endif %}