Have got publishing to Netlify
This commit is contained in:
parent
8e0ffb6c24
commit
7ef6725bdb
23 changed files with 667 additions and 109 deletions
|
|
@ -19,7 +19,7 @@ func (s *Site) Create() fiber.Handler {
|
|||
return err
|
||||
}
|
||||
|
||||
return c.Redirect(fmt.Sprintf("/sites/%v", site.ID))
|
||||
return c.Redirect(fmt.Sprintf("/sites/%v/posts", site.ID))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -41,6 +41,16 @@ func (s *Site) Show() fiber.Handler {
|
|||
}
|
||||
}
|
||||
|
||||
func (s *Site) Rebuild() fiber.Handler {
|
||||
return func(c *fiber.Ctx) error {
|
||||
if err := s.Site.Rebuild(c.UserContext(), GetSite(c)); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return c.Redirect(fmt.Sprintf("/sites/%v/posts", GetSite(c).ID))
|
||||
}
|
||||
}
|
||||
|
||||
func (s *Site) WithSite() fiber.Handler {
|
||||
return func(c *fiber.Ctx) error {
|
||||
id, err := c.ParamsInt("siteId")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue