Is there any way to get a dynamic title into data-driven / generated pages? I see there are quite a few issues about being unable to get interpolation into frontmatter, but is there no workaround?
This is a huge missing feature if so, do all of the data-driven 11ty sites just have terrible SEO?
It would otherwise look like this:
pagination:
data: personList
size: 1
alias: person
title: {{person.name}}
permalink: /{{ person.name | slug }}/index.html
---
<h1>{{person.name}}</h1>
Could you provide more details?
For example, the file structure (source and output), the data source (for person) and a snippet of the resulting HTML as you imagine it?
There is an example of this working with renderData here: https://github.com/11ty/eleventy/issues/255
I initially assumed that my renderData items would be merged into the top level, with e.g.
renderData:
title: some {{ tag }}
making title available as a variable. I ended up using my variables like {{ title or (renderData and renderData.title) }}
Whoa Lyn that is an incredible idea. I really love that. I may add another feature that does this
@lynlevenick鈥檚 idea was opened at #481.
This is an automated message to let you know that a helpful response was posted to your issue and for the health of the repository issue tracker the issue will be closed. This is to help alleviate issues hanging open waiting for a response from the original poster.
If the response works to solve your problem鈥攇reat! But if you鈥檙e still having problems, do not let the issue鈥檚 closing deter you if you have additional questions! Post another comment and I will reopen the issue. Thanks!
Most helpful comment
Whoa Lyn that is an incredible idea. I really love that. I may add another feature that does this