Skip to content

Commit

Permalink
Merge pull request #43 from salim-b/custom-script-footer
Browse files Browse the repository at this point in the history
Add partial for custom script-footer
  • Loading branch information
h-enk committed Aug 11, 2023
2 parents e8d8831 + 8aa2316 commit 334f8ee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ partial "footer/esbuild" (dict "src" "js/app.js" "targetPath" "main.js" "load" "async" "transpile" false) -}}
{{/* Put your custom <script></script> tags here */}}

{{/* EXAMPLE - only load script for production
{{ if eq (hugo.Environment) "production" -}}
Expand Down
7 changes: 5 additions & 2 deletions layouts/partials/footer/script-footer.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{{ $bootstrapJavascript := site.Data.doks.bootstrapJavascript -}}
{{ if $bootstrapJavascript -}}
{{ partial "footer/esbuild" (dict "src" "js/bootstrap.js" "load" "async" "transpile" false) -}}
{{ end -}}
{{ partial "footer/script-footer-core.html" . -}}
{{- end }}

{{ partial "footer/esbuild" (dict "src" "js/app.js" "targetPath" "main.js" "load" "async" "transpile" false) -}}

{{ partial "footer/script-footer-custom.html" . -}}

{{ partial "main/showFlexSearch" . -}}
{{ $showFlexSearch := .Scratch.Get "showFlexSearch" -}}
Expand Down

0 comments on commit 334f8ee

Please sign in to comment.