From 19cf37dd9cf5fbb13b6ef7eb3764ec45b0401b33 Mon Sep 17 00:00:00 2001 From: seth9976 Date: Fri, 26 Dec 2025 11:22:30 +0800 Subject: [PATCH] Refactor service worker registration and analytics template --- .../book/layouts/partials/docs/html-head.html | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/website/themes/book/layouts/partials/docs/html-head.html b/website/themes/book/layouts/partials/docs/html-head.html index cc915d0ef..f09eef980 100644 --- a/website/themes/book/layouts/partials/docs/html-head.html +++ b/website/themes/book/layouts/partials/docs/html-head.html @@ -15,7 +15,6 @@ {{ end -}} - {{- $styles := resources.Get "book.scss" | resources.ExecuteAsTemplate "book.scss" . | resources.ToCSS | resources.Minify | resources.Fingerprint }} @@ -26,8 +25,6 @@ {{ end -}} {{- if .Site.Params.BookServiceWorker }} - {{- $swJS := resources.Get "serviceworker-v1.js" | resources.Minify | resources.Fingerprint }} {{ end -}} -{{- template "_internal/google_analytics_async.html" . -}} - +{{- template "_internal/google_analytics.html" . -}} + {{- with .OutputFormats.Get "rss" -}} {{ printf `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} {{ end -}} -{{ "" | safeHTML }} +{{ "" | safeHTML }}