add htmx option

Signed-off-by: lucasew <lucas59356@gmail.com>
This commit is contained in:
lucasew 2024-01-30 14:48:38 -03:00
parent d6cd6d9175
commit 6d0deb4b29
2 changed files with 10 additions and 1 deletions

View File

@ -6,6 +6,9 @@
<html lang="{{ site.Language }}" dir="{{ .Language.LanguageDirection | default "auto" }}"> <html lang="{{ site.Language }}" dir="{{ .Language.LanguageDirection | default "auto" }}">
<head> <head>
{{ if site.Params.htmx }}
{{- partialCached "script-htmx.html" . -}}
{{ endif }}
{{- partial "head.html" . }} {{- partial "head.html" . }}
</head> </head>
@ -16,7 +19,12 @@
{{- if eq site.Params.defaultTheme `dark` -}} {{- if eq site.Params.defaultTheme `dark` -}}
{{- print " dark" }} {{- print " dark" }}
{{- end -}} {{- end -}}
" id="top"> " id="top"
{{- if site.Params.htmx -}}
hx-boost="true" hx-push-url="true"
{{- endif -}}
>
{{- partialCached "header.html" . .Page -}} {{- partialCached "header.html" . .Page -}}
<main class="main"> <main class="main">
{{- block "main" . }}{{ end }} {{- block "main" . }}{{ end }}

View File

@ -0,0 +1 @@
<script src="https://unpkg.com/htmx.org@1.9.10"></script>