diff --git a/template/functions.go b/template/functions.go index d705f098..a38893e0 100644 --- a/template/functions.go +++ b/template/functions.go @@ -13,6 +13,7 @@ import ( "time" "miniflux.app/config" + "miniflux.app/crypto" "miniflux.app/http/route" "miniflux.app/locale" "miniflux.app/model" @@ -87,6 +88,9 @@ func (f *funcMap) Map() template.FuncMap { iconName, )) }, + "rand": func() string { + return crypto.GenerateRandomStringHex(10) + }, // These functions are overrode at runtime after the parsing. "elapsed": func(timezone string, t time.Time) string { diff --git a/template/templates/common/layout.html b/template/templates/common/layout.html index 5b028f77..7589847c 100644 --- a/template/templates/common/layout.html +++ b/template/templates/common/layout.html @@ -36,7 +36,7 @@ {{ if and .user .user.Stylesheet }} - + {{ end }}