Skip to content

Commit

Permalink
feat: add the module-exists function (#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
razonyang authored Feb 3, 2024
1 parent 9c55e44 commit 07c929b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions layouts/partials/hb/functions/module-exists.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{{- $exists := false }}
{{- $module := . }}
{{- range hugo.Deps }}
{{- if eq .Path $module }}
{{- $exists = true }}
{{- break }}
{{- end }}
{{- end }}
{{- return $exists }}

0 comments on commit 07c929b

Please sign in to comment.