aboutsummaryrefslogtreecommitdiffstats
path: root/modules/templates
diff options
context:
space:
mode:
authorJonas <cez81@users.noreply.github.com>2017-04-01 03:03:01 +0200
committerLunny Xiao <xiaolunwen@gmail.com>2017-03-31 18:03:01 -0700
commit095e1f51556d940a07d9f8580d0d25acf6a39c63 (patch)
tree0f704e7f9bcab17bb20fcb1c769846cbf3ccdc80 /modules/templates
parent6a39250579f240721d5d8b2eca017fa94126dc9d (diff)
downloadgitea-095e1f51556d940a07d9f8580d0d25acf6a39c63.tar.gz
gitea-095e1f51556d940a07d9f8580d0d25acf6a39c63.zip
Support for custom html meta (#1423)
* Support for custom html meta * Changed html meta description default
Diffstat (limited to 'modules/templates')
-rw-r--r--modules/templates/helper.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/templates/helper.go b/modules/templates/helper.go
index dd8a0fdd35..2e756ce364 100644
--- a/modules/templates/helper.go
+++ b/modules/templates/helper.go
@@ -110,6 +110,15 @@ func NewFuncMap() []template.FuncMap {
"ThemeColorMetaTag": func() string {
return setting.UI.ThemeColorMetaTag
},
+ "MetaAuthor": func() string {
+ return setting.UI.Meta.Author
+ },
+ "MetaDescription": func() string {
+ return setting.UI.Meta.Description
+ },
+ "MetaKeywords": func() string {
+ return setting.UI.Meta.Keywords
+ },
"FilenameIsImage": func(filename string) bool {
mimeType := mime.TypeByExtension(filepath.Ext(filename))
return strings.HasPrefix(mimeType, "image/")