Skip to content

Commit

Permalink
hooks(feat): add collector of hooks
Browse files Browse the repository at this point in the history
see #15

Signed-off-by: Patrick Kollitsch <[email protected]>
  • Loading branch information
davidsneighbour committed Oct 12, 2024
1 parent 3f38783 commit f51471d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/hooks/layouts/partials/dump-collector.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{{- $scratch := page.Scratch.Get "dnb.hooks" -}}
{{- partial "debug-print.html" $scratch -}}
6 changes: 6 additions & 0 deletions modules/hooks/layouts/partials/func/hooks/collector.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{{ $scratch := page.Scratch.Get "dnb.hooks" }}
{{ if eq $scratch "" }}
{{ $scratch = slice }}
{{ end }}
{{- page.Scratch.Add "dnb.hooks" (slice .hook) -}}

0 comments on commit f51471d

Please sign in to comment.