Skip to content

Commit

Permalink
feat: allow using page store key as cache key by setting `cache_store…
Browse files Browse the repository at this point in the history
…_key` for hooks
  • Loading branch information
razonyang committed Jun 16, 2024
1 parent 83f2f45 commit eac2547
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions layouts/partials/hugopress/functions/render-hooks.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
{{- partialCached .partial $ctx (index $page.Params .cache_param_key) }}
{{- else if ne .cache_site_param_key nil }}
{{- partialCached .partial $ctx (index site.Params .cache_site_param_key) }}
{{- else if ne .cache_store_key nil }}
{{- partialCached .partial $ctx ($page.Store.Get .cache_store_key) }}
{{- else }}
{{- partialCached .partial $ctx }}
{{- end }}
Expand Down

0 comments on commit eac2547

Please sign in to comment.