From a7f780e5be8e590aaecf1b63844da5d09e47aa15 Mon Sep 17 00:00:00 2001 From: Nikita Tokarchuk Date: Fri, 3 Dec 2021 04:31:23 +0100 Subject: [PATCH] Include app js script to the template header --- frontend/templates/funcs.go | 3 +++ frontend/templates/head.go.tmpl | 2 ++ frontend/templates/urls.go | 1 + 3 files changed, 6 insertions(+) diff --git a/frontend/templates/funcs.go b/frontend/templates/funcs.go index 16f265e..7320b38 100644 --- a/frontend/templates/funcs.go +++ b/frontend/templates/funcs.go @@ -10,6 +10,9 @@ func UseFuncs() template.FuncMap { "sub": func(i int) int { return i - 1 }, + "getJSAppURL": func() string { + return URLJSApp + }, "getIndexURL": func() string { return URLIndex }, diff --git a/frontend/templates/head.go.tmpl b/frontend/templates/head.go.tmpl index 10dac4e..4c805e2 100644 --- a/frontend/templates/head.go.tmpl +++ b/frontend/templates/head.go.tmpl @@ -4,4 +4,6 @@ {{ .Title }} + + \ No newline at end of file diff --git a/frontend/templates/urls.go b/frontend/templates/urls.go index 9c9213a..29e7f56 100644 --- a/frontend/templates/urls.go +++ b/frontend/templates/urls.go @@ -5,4 +5,5 @@ const ( URLIndex = "/index.aspx" URLBlog = "/blog.aspx" URLPost = "/post.aspx" + URLJSApp = "/js-bin/app.js" )