mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-09-18 17:48:00 +08:00
添加iframe支持(conf enable_iframe
)
This commit is contained in:
@@ -263,6 +263,12 @@ func RegisterFunction() {
|
||||
logs.Error("注册函数 urlfor 出错 ->", err)
|
||||
os.Exit(-1)
|
||||
}
|
||||
//读取配置值(未作任何转换)
|
||||
err = web.AddFuncMap("conf", conf.CONF)
|
||||
if err != nil {
|
||||
logs.Error("注册函数 conf 出错 ->", err)
|
||||
os.Exit(-1)
|
||||
}
|
||||
err = web.AddFuncMap("date_format", func(t time.Time, format string) string {
|
||||
return t.Local().Format(format)
|
||||
})
|
||||
|
Reference in New Issue
Block a user