Skip to content

Commit

Permalink
fix: add support for multihost (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
razonyang committed Nov 2, 2023
1 parent af51c9e commit 55d7a51
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions layouts/partials/pwa/assets/sw.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@
{{/* JS compile options. */}}
{{- $precaches := slice }}
{{- $langs := slice }}
{{- $host := .Site.BaseURL }}
{{/* Get precaches pages. */}}
{{- range .Sites }}
{{/* Do not precache other hosts assets. */}}
{{- if ne $host .BaseURL }}
{{- continue }}
{{- end }}
{{- $langs = $langs | append .Language.Lang }}
{{- $home := .GetPage "/" }}
{{- if not $home }}
Expand Down

0 comments on commit 55d7a51

Please sign in to comment.