Skip to content

Commit

Permalink
move htmx config to ts
Browse files Browse the repository at this point in the history
  • Loading branch information
edcohen08 committed Jul 25, 2023
1 parent a68fdf4 commit 9a0fbf7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ if (import.meta.env.MODE !== "development") {
// https://github.com/vitejs/vite/issues/4786
}

htmx.config.historyCacheSize = 0;

// Optional behavior - will remove scroll to top animation for boosted pages
htmx.config.scrollBehavior = "auto";

htmx.defineExtension("get-csrf", {
onEvent(name: string, evt: any) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
content="ie=edge"/>
<meta name="viewport"
content="width=device-width, initial-scale=1.0"/>
<meta name="htmx-config" content='{"scrollBehavior":"auto", "historyCacheSize": 0}'>
{% block opengraph %}
{% from 'components/open_graph_tags.jinja' import og_tags %}
{{ og_tags(title="TODO | Home", url="TODO", description="TODO", image_url="TODO")}}
Expand Down

0 comments on commit 9a0fbf7

Please sign in to comment.