preaction / Statocles

Static website CMS
http://preaction.me/statocles
Other
84 stars 33 forks source link

Missing store argument for blog app in default site config #580

Closed jjatria closed 4 years ago

jjatria commented 4 years ago

The default config file generated by create seems to be missing a store argument for the Blog app.

In that file, the blog app is defined as

blog_app:
    $class: 'Statocles::App::Blog'
    url_root: '/blog'

But the documentation for the blog app says that store is required, and indeed, with a fresh config file this dies:

$ perl -MBeam::Wire -E 'Beam::Wire->new( file => "site.yml" )->get("site")'
Missing required arguments: store at lib/Beam/Wire.pm line 552.

A change like the following makes the error go away:

diff --git a/share/create/site.yml b/share/create/site.yml
index 36c6221..a560044 100644
--- a/share/create/site.yml
+++ b/share/create/site.yml
@@ -116,3 +116,4 @@ deploy:
 blog_app:
     $class: 'Statocles::App::Blog'
     url_root: '/blog'
+    store: '_posts'

I could put together a PR to fix this, but I'm not sure what you'd like as a default store for blogs (or if I'm doing something wrong and this is supposed to happen).

preaction commented 4 years ago

Ah, ha. This was what I was afraid of: The refactor I was in the middle of completely broke things (see f7c8d5b98da434d2752cec7230ed4f605c029005). It should be "blog" as the default. I'll fix that and make a v0 release along with #563 and #579.

preaction commented 4 years ago

Well, this is fixed because I reset the v0 branch to before the aborted refactor (so, before the bug was introduced). I'll make a release tonight. Thanks for the report!