Skip to content

Commit

Permalink
Added some routes to make some wordpress routes work here
Browse files Browse the repository at this point in the history
  • Loading branch information
compscidr committed Jul 28, 2023
1 parent 17a7a3a commit c404320
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions goblog.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,20 +151,25 @@ func main() {
router.GET("/", _blog.Home)
router.GET("/index.php", _blog.Home)
router.GET("/posts/:yyyy/:mm/:dd/:slug", _blog.Post)
// lets posts work with our without the word posts in front
router.GET("/:yyyy/:mm/:dd/:slug", _blog.Post)
router.GET("/admin/posts/:yyyy/:mm/:dd/:slug", _admin.Post)
router.GET("/tag/:name", _blog.Tag)
router.GET("/login", _blog.Login)
router.GET("/logout", _blog.Logout)

//todo: register a template mapping to a "page type"
router.GET("/posts", _blog.Posts)
router.GET("/blog", _blog.Posts)
router.GET("/tags", _blog.Tags)
router.GET("/presentations", _blog.Speaking)
router.GET("/research", _blog.Research)
router.GET("/projects", _blog.Projects)
router.GET("/about", _blog.About)
router.GET("/sitemap.xml", _blog.Sitemap)
router.GET("/archives", _blog.Archives)
// lets old WordPress stuff stored at wp-content/uploads work
router.Use(static.Serve("/wp-content", static.LocalFile("www", false)))

router.GET("/admin", _admin.Admin)

Expand Down

0 comments on commit c404320

Please sign in to comment.