mirror of
https://github.com/eiblog/eiblog.git
synced 2026-02-13 01:42:27 +08:00
feat: support custom page
This commit is contained in:
@@ -39,12 +39,12 @@ func init() {
|
||||
logrus.Fatal("init timezone: ", err)
|
||||
}
|
||||
// 模板解析初始化
|
||||
root := filepath.Join(config.EtcDir, "template", "*.xml")
|
||||
root := filepath.Join(config.EtcDir, "xml", "*.xml")
|
||||
XMLTemplate, err = template.New("eiblog").Funcs(tools.TplFuncMap).ParseGlob(root)
|
||||
if err != nil {
|
||||
logrus.Fatal("init xml template: ", err)
|
||||
}
|
||||
root = filepath.Join(config.EtcDir, "website")
|
||||
root = filepath.Join(config.EtcDir, "template")
|
||||
files := tools.ReadDirFiles(root, func(fi fs.DirEntry) bool {
|
||||
// should not read dir & .DS_Store
|
||||
return strings.HasPrefix(fi.Name(), ".")
|
||||
|
||||
@@ -42,6 +42,7 @@ func baseFEParams(c *gin.Context) gin.H {
|
||||
"Disqus": config.Conf.Disqus,
|
||||
"AdSense": config.Conf.Google.AdSense,
|
||||
"Version": version,
|
||||
"Pages": config.Conf.Pages,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user