a Ponzu addon to create a web frontend for your CMS.
from within your Ponzu project, run:
$ ponzu add github.com/bosssauce/frontend
Usage:
// content/song.go
package content
import (
// import the frontend addon
"github.com/bosssauce/frontend"
...
)
type Song struct {
title string `json:"title"`
...
}
func init() {
// add routes/handlers to the frontend Router, which embeds a *mux.Router
frontend.Router.HandleFunc("/songs", func(res http.ResponseWriter, req *http.Request) {
// GET /api/contents?type=Song
...
})
}