terminal-labs / lektor-jinja-content

Render Lektor content fields with Jinja2.
Other
11 stars 5 forks source link

Check existence of _data attribute on context #11

Closed cesalazar closed 6 years ago

cesalazar commented 6 years ago

Not all the contexts have a _data attribute, which makes the build fail when trying to access it.

This happened when I tried to build a project that includes lektor-tags (v0.1) (which, coincidentally, I just discovered you're a maintainer :))

The errors are:

U blog/tag/bitcoin/index.html
E blog/tag/bitcoin/index.html (AttributeError: 'TagPage' object has no attribute '_data')
U blog/tag/cloud/index.html
E blog/tag/cloud/index.html (AttributeError: 'TagPage' object has no attribute '_data')
...
nixjdm commented 6 years ago

Thanks! I'll add lektor-tags to the list of plugins to test, too. #10

nixjdm commented 6 years ago

@cesalazar This is now in 0.4.2 :)