From 52ef7fb9af62d80aa76ae42de7fdce4cbe1785f7 Mon Sep 17 00:00:00 2001 From: setop Date: Mon, 16 Jun 2025 23:26:55 +0200 Subject: [PATCH] feat(backend): add html hooks into the app main page html snippets are injected in the main template. they can be defined in the application config. documentation to come. closes #1719 --- lib/web/templates/page/index.html.heex | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/web/templates/page/index.html.heex b/lib/web/templates/page/index.html.heex index 7cf7efa13..d0fcf595b 100644 --- a/lib/web/templates/page/index.html.heex +++ b/lib/web/templates/page/index.html.heex @@ -1,6 +1,7 @@ + <%= raw(Mobilizon.Config.get([:html_hooks, :app_index_html_head_first], "")) %> @@ -24,9 +25,11 @@ <%= tags(assigns) || assigns.tags %> <%= Vite.vite_client() %> <%= Vite.vite_snippet("src/main.ts") %> + <%= raw(Mobilizon.Config.get([:html_hooks, :app_index_html_head_last], "")) %> + <%= raw(Mobilizon.Config.get([:html_hooks, :app_index_html_body_first], "")) %>
+ <%= raw(Mobilizon.Config.get([:html_hooks, :app_index_html_body_last], "")) %>