lektor / lektor-atom

Lektor Atom plugin.
30 stars 13 forks source link

Body field 'body' not found in <Page model='blog' path='/blog #20

Open rgommers opened 5 years ago

rgommers commented 5 years ago
U feed.xml
E blog: Body field 'body' not found in <Page model='blog' path='/blog'>

This seems to happen even if item_model is set to blog-post and hosting the blog under blog/ rather than at /. Full atom.ini:

[blog]
name = My Site
source_path = blog/
url_path = https://full-url-to-site/blog/
filename = feed.xml
items = site.query('/blog/').filter(F.type == 'blog-post')
item_model = blog-post
goanpeca commented 5 years ago

@rgommers could you provide the repo where you are working so I can take a look at a live example?

rgommers commented 5 years ago

thanks @goanpeca. Here is the branch I'm working on: https://github.com/rgommers/quansight-labs-site/tree/pygments-atom

nixjdm commented 5 years ago

@rgommers tangential tips from your snippet:

I think url_path and filename are mutually exclusive. For me it seems that when both are specified, only url_path is used.

Also you might not need to specify items / items_model like that if all the children of /blog are blog-post pages. That's a pretty common setup.

The README should be improved.

rgommers commented 5 years ago

Thanks @nixjdm. Removing items and items_model indeed worked better. I put them there because it's in the README, but indeed not needed (a comment in README would be good).