Skip to content

Commit

Permalink
perf: cache partial against the analyze page parameter (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
razonyang committed Jun 1, 2024
1 parent 397605b commit fa3ac79
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
min = "0.110.0"

[params.hugopress.modules.google-analytics.hooks.head-end]
cacheable = true
cache_param_key = "analyze"
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
{{ partial "google-analytics/index" .Page }}
{{- if default true .Page.Params.analyze }}
{{ partialCached "google-analytics/script" . }}
{{- end }}

0 comments on commit fa3ac79

Please sign in to comment.