aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/blogspace/seed.go12
1 files changed, 11 insertions, 1 deletions
diff --git a/cmd/blogspace/seed.go b/cmd/blogspace/seed.go
index 010eff5..7862363 100644
--- a/cmd/blogspace/seed.go
+++ b/cmd/blogspace/seed.go
@@ -81,10 +81,20 @@ func seed(ctx context.Context, cfg *config.Config, st *store.Store) error {
theme := web.DefaultTheme()
theme.BgImage = bg.ID.String()
theme.BgMode = "tile"
- theme.FooterText = "© Alice — made with Blogspace"
if err := st.UpdateBlogTheme(ctx, blog.ID, theme.JSON()); err != nil {
return err
}
+ // a footer line and a right column, so the layout options have something to show
+ for _, m := range []store.Module{
+ {Area: "footer", Kind: "text", Body: "© Alice — made with Blogspace"},
+ {Area: "right", Kind: "recent", Title: "Recent posts", Count: 5},
+ {Area: "right", Kind: "archive", Title: "Archive"},
+ } {
+ m.BlogID = blog.ID
+ if _, err := st.CreateModule(ctx, &m); err != nil {
+ return err
+ }
+ }
// a second page of posts on the home page, to show pagination
for i := 0; i < 10; i++ {