diff --git a/route/route.go b/route/route.go index 40318ff..2b85082 100644 --- a/route/route.go +++ b/route/route.go @@ -26,8 +26,8 @@ func SetupRouter() *gin.Engine { }, }) reader := templates.NewFsTemplate(r.FuncMap) - reader.AddTemplate("index", "posts/index.html", "layout/*.html") - reader.AddTemplate("detail", "posts/detail.html", "layout/*.html") + reader.AddTemplate("index", "posts/index.gohtml", "layout/*.gohtml") + reader.AddTemplate("detail", "posts/detail.gohtml", "layout/*.gohtml") r.HTMLRender = reader r.Use(middleware.SetStaticFileCache) //gzip 因为一般会用nginx做反代时自动使用gzip,所以go这边本身可以不用 diff --git a/templates/layout/footer.gohtml b/templates/layout/footer.gohtml index d99876c..e20eb25 100644 --- a/templates/layout/footer.gohtml +++ b/templates/layout/footer.gohtml @@ -1,7 +1,7 @@ {{define "layout/footer"}} -
您好,这是一条评论。若需要审核、编辑或删除评论,请访问仪表盘的评论界面。评论者头像来自 Gravatar。
+