Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
embl.org
vf-core-mirror
Commits
88644154
Commit
88644154
authored
Nov 26, 2021
by
Ken Hawkins
Browse files
Avoid bug `TemplateContentPrematureUseError` on dev
Hopefully resolved by elevent 1.0 stable release.
parent
80978cdc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
tools/vf-component-library/src/site/feed.njk
tools/vf-component-library/src/site/feed.njk
+12
-1
No files found.
tools/vf-component-library/src/site/feed.njk
View file @
88644154
...
...
@@ -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>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment