main.go: Aggiunto route per il blog da content-poisson

main-old
Antonio De Lucreziis 4 years ago
parent 246b82c5b0
commit c61287f412

@ -35,7 +35,17 @@ func main() {
// Static assets
e.Static("/assets", "./assets")
e.Static("/blog", "./blog/public")
// Blog from "content-poisson"
blogRoute := e.Group("/blog", middleware.Static("./blog"))
{
blogRoute.GET("", func(c echo.Context) error {
return c.Redirect(http.StatusPermanentRedirect, "/blog/")
})
blogRoute.GET("/", func(c echo.Context) error {
return c.File("./blog/index.html")
})
}
// Routes
e.GET("/", func(c echo.Context) error {

Loading…
Cancel
Save