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

feat: add option to turn off PWA (#527)

This commit is contained in:
Cotes Chung
2022-06-05 00:10:20 +08:00
parent d127183b97
commit 106c981bac
4 changed files with 35 additions and 14 deletions

View File

@@ -90,7 +90,11 @@
{% if jekyll.environment == 'production' %}
<!-- PWA -->
<script defer src="{{ '/app.js' | relative_url }}"></script>
{% if site.pwa.enabled %}
<script defer src="{{ '/app.js' | relative_url }}"></script>
{% else %}
<script defer src="{{ '/unregister.js' | relative_url }}"></script>
{% endif %}
<!-- GA -->
{% if site.google_analytics.id != empty and site.google_analytics.id %}