diff --git a/app.go b/app.go index 65a6db4..6d33c94 100644 --- a/app.go +++ b/app.go @@ -139,6 +139,12 @@ func hugoNewSite(w http.ResponseWriter, r *http.Request) { w.Write([]byte(fmt.Sprintf("unable to clone 'nostyleplease' theme: %s", err))) } + sites, err := existingSites() + if err != nil { + w.Write([]byte(fmt.Sprintf("unable to list existing sites: %s", err))) + } + + templ.Handler(components.Homepage(sites)).ServeHTTP(w, r) } // NewRouter creates a new web router. diff --git a/components/templates.templ b/components/templates.templ index 7aa67b7..8df89ee 100644 --- a/components/templates.templ +++ b/components/templates.templ @@ -15,7 +15,8 @@ templ Homepage(sites []string) { }