terminal-labs / lektor-jinja-content

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

Support for databags #4

Open topper-123 opened 6 years ago

topper-123 commented 6 years ago

Using databags in the content doesn't work, is that correct? Is this a known issue?

I propose adding support for databags to lektor-jinja-content, as it's useful to pick up values from there into contents.

nixjdm commented 6 years ago

Thanks for pointing this out! This was an oversight, I forgot to check this and get it working, and it currently doesn't. I'll try to get bags working too.

cesalazar commented 6 years ago

I just tested this, bag() and |url are working correctly on v0.4.1 but |asseturl isn't. My site has the option url_style = external.

contents.lr:
{{ bag('site').name }}
<img src="{{ 'picture.jpg'|url }}" />
<img src="{{ 'picture.jpg'|asseturl }}" /> *not* working.

renders:
The name of my site
<img src="<domain>/<path>/picture.jpg">
<img src=""> *not* working.