Include app js script to the template header

This commit is contained in:
2021-12-03 04:31:23 +01:00
parent f182988346
commit a7f780e5be
3 changed files with 6 additions and 0 deletions
+3
View File
@@ -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
},
+2
View File
@@ -4,4 +4,6 @@
<meta name="description" content="{{ .Description }}"/>
<title>{{ .Title }}</title>
<script type="text/javascript" src="{{ getJSAppURL }}" async></script>
</head>
+1
View File
@@ -5,4 +5,5 @@ const (
URLIndex = "/index.aspx"
URLBlog = "/blog.aspx"
URLPost = "/post.aspx"
URLJSApp = "/js-bin/app.js"
)