From 265dd224d5268bddda494b641b834e06ade4e107 Mon Sep 17 00:00:00 2001 From: Jieiku Date: Thu, 21 Sep 2023 01:08:31 -0700 Subject: Disable PWA during Zola Serve --- templates/partials/head_js.html | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'templates/partials/head_js.html') diff --git a/templates/partials/head_js.html b/templates/partials/head_js.html index 9a5604a..0d3a8fb 100644 --- a/templates/partials/head_js.html +++ b/templates/partials/head_js.html @@ -22,17 +22,18 @@ {%- endif %} {%- endif %} - +{%- if config.mode != "serve" -%}{%- set notserve = true %}{%- endif %} {%- if config.extra.js_bundle %} + {%- if config.build_search_index %} - {%- if config.extra.pwa | default(value=false) %} + {%- if notserve and config.extra.pwa | default(value=false) %} {%- else %} {%- endif %} {%- else %} - {%- if config.extra.pwa | default(value=false) %} + {%- if notserve and config.extra.pwa | default(value=false) %} {%- else %} @@ -68,7 +69,7 @@ {%- endif %} - {%- if config.extra.pwa | default(value=false) %} + {%- if notserve and config.extra.pwa | default(value=false) %} {%- endif %} -- cgit v1.3.1