new: Complete modules related to home page, archive page and article page

This commit is contained in:
2024-12-16 14:13:58 +08:00
parent 04267841f0
commit 65e5e9eafc
49 changed files with 1547 additions and 1 deletions

View 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)
}