summaryrefslogtreecommitdiff
path: root/tags/tags.go
diff options
context:
space:
mode:
authorBobby <[email protected]>2026-01-20 14:02:34 +0530
committerBobby <[email protected]>2026-01-20 14:02:34 +0530
commit7fee36b4fbae90dacdecb917e262ad58927fe746 (patch)
tree3739af9bf8d2e78c6536a7dfa24ce391abb90ff1 /tags/tags.go
parent61d5f45189a40621bceeb14c6646031dd15ab6c2 (diff)
downloadcafe-7fee36b4fbae90dacdecb917e262ad58927fe746.tar.xz
cafe-7fee36b4fbae90dacdecb917e262ad58927fe746.zip
Add Tailwind CSS and HTMX integration and implement custom template tags
Diffstat (limited to 'tags/tags.go')
-rw-r--r--tags/tags.go26
1 files changed, 26 insertions, 0 deletions
diff --git a/tags/tags.go b/tags/tags.go
new file mode 100644
index 0000000..6229c20
--- /dev/null
+++ b/tags/tags.go
@@ -0,0 +1,26 @@
+package tags
+
+import (
+ "log"
+
+ "github.com/flosch/pongo2/v6"
+)
+
+type templateTag struct {
+ Name string
+ Fn pongo2.TagParser
+}
+
+func Initialize() {
+
+ tags := []templateTag{
+ {"url", url},
+ {"static", static},
+ }
+
+ for _, t := range tags {
+ if err := pongo2.RegisterTag(t.Name, t.Fn); err != nil {
+ log.Println("Failed to register tag:", t.Name, "Error:", err)
+ }
+ }
+}