From 6d0deb4b29e774d36ebc574e1fd90247134eb5a1 Mon Sep 17 00:00:00 2001 From: lucasew Date: Tue, 30 Jan 2024 14:48:38 -0300 Subject: [PATCH] add htmx option Signed-off-by: lucasew --- layouts/_default/baseof.html | 10 +++++++++- layouts/partials/script-htmx.html | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 layouts/partials/script-htmx.html diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index df611bf..15e3e6e 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -6,6 +6,9 @@ + {{ if site.Params.htmx }} + {{- partialCached "script-htmx.html" . -}} + {{ endif }} {{- partial "head.html" . }} @@ -16,7 +19,12 @@ {{- if eq site.Params.defaultTheme `dark` -}} {{- print " dark" }} {{- end -}} -" id="top"> +" id="top" +{{- if site.Params.htmx -}} +hx-boost="true" hx-push-url="true" +{{- endif -}} + +> {{- partialCached "header.html" . .Page -}}
{{- block "main" . }}{{ end }} diff --git a/layouts/partials/script-htmx.html b/layouts/partials/script-htmx.html new file mode 100644 index 0000000..b69e604 --- /dev/null +++ b/layouts/partials/script-htmx.html @@ -0,0 +1 @@ +