lwojcik / eleventy-template-bliss

Single-column blog template for Eleventy focused on simplicity without sacrificing functionality
https://eleventy-bliss.lkmt.us/
MIT License
85 stars 19 forks source link

Template syntax not recognised in data cascade #120

Closed cioportfolio closed 2 weeks ago

cioportfolio commented 5 months ago

Thank you for this excellent 11ty template.

Except for permalink template syntax in data is not processed. This affects things like the default description in posts.json and pages.json. I couldn't get eleventyComputed to work (there may be a 11ty/njk bug) but I achieved a similar effect by modifying the head.njk partial. See below. I thought you might find this useful.

{%- set pageDescription -%} {%- if tag -%} {{ phrases.view_all_articles_tagged_as }} {{ tag.title|capitalizeAllWords }} {%- elif description -%} {{ description | truncate(140) }} {%- elif (tags or []).indexOf('post') > -1 -%} {{- page.excerpt -}} {%- elif (tags or []).indexOf('page') > -1 -%} {{- title -}} {%- else -%} {{ siteConfig.site.description }} {%- endif -%} {%- endset -%}

lwojcik commented 5 months ago

Hi @cioportfolio,

Thanks for letting me know! I'll have a look at this soon-ish.

May is coming and I'm having some days off, so it might have to wait a little longer, but I'll get back to it.