Commit 88644154 authored by Ken Hawkins's avatar Ken Hawkins
Browse files

Avoid bug `TemplateContentPrematureUseError` on dev

Hopefully resolved by elevent 1.0 stable release.
parent 80978cdc
......@@ -26,7 +26,18 @@ metadata:
<link href="{{ absolutePostUrl }}"/>
<updated>{{ post.date | rssDate }}</updated>
<id>{{ absolutePostUrl }}</id>
<content type="html">{{ post.templateContent | htmlToAbsoluteUrls(absolutePostUrl) }}</content>
<content type="html">
{%- if serverInfo.environment == "development" -%}
Due to a bug in 1.0.0 Eleventy betas, `templateContent` is not always correctly built.
`TemplateContentPrematureUseError` was thrown:
[11ty] TemplateContentPrematureUseError: Tried to use templateContent too early
So on dev we don't generate the RSS
{%- else -%}
{{ post.templateContent | htmlToAbsoluteUrls(absolutePostUrl) }}
{% endif -%}
</content>
</entry>
{%- endfor %}
</feed>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment