Setting computed page title in webc #4196
Unanswered
peterjanes
asked this question in
Q&A
Replies: 1 comment
-
|
Answering my own query: it looks like |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Based on other discussions here it seems that a) front matter for
webctemplates can only be set through JavaScript, b) data files are the preferred way to seteleventyComputed, and c) dynamictitles are supported (e.g. #2768).With all that being said, I'm running into a strange issue where the wrong (constant?) title value is being inserted into my webc pages, despite being correct in the computed title function.
venues.11tydata.jsexcerpt:All of the pages are generated with their unique slugs, the logs for each page show the unique name of the entry, but they all get the title of the first entry in the collection. (It's global data in practice, but the source doesn't seem to affect the behaviour.)
Template excerpt (updated; I was copying manually from my code):
npx @11ty/eleventyexcerpt:Checking the output:
This must be something simple, but I can't spot it in the code or the documentation. Possibly a bug in webc? I'm stumped; any thoughts?
Beta Was this translation helpful? Give feedback.
All reactions