mirror of
https://github.com/yv1ing/MollyBlog.git
synced 2025-09-16 14:53:45 +08:00
new: Complete modules related to home page, archive page and article page
This commit is contained in:
11
internal/mApp/mTemplate.go
Normal file
11
internal/mApp/mTemplate.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package mApp
|
||||
|
||||
import "fmt"
|
||||
|
||||
func (ma *MApp) loadTemplates() {
|
||||
assetsPath := fmt.Sprintf("%s/assets", ma.Config.Template)
|
||||
htmlPath := fmt.Sprintf("%s/html/*.html", ma.Config.Template)
|
||||
|
||||
ma.engine.Static("/assets", assetsPath)
|
||||
ma.engine.LoadHTMLGlob(htmlPath)
|
||||
}
|
||||
Reference in New Issue
Block a user