Is your feature request related to a problem? Please describe.
I've been using landing page overrides for a while. As per the built-in landing pages, I've used frontmatter to set the title.
I've just needed to convert one to ERB (so added a .erb suffix so the ERB processor runs on it). At this point the frontmatter stops being read, and I instead get the frontmatter inserted at the beginning of the output page (and the variable is no longer accessible for making table of contents etc).
Describe the solution you'd like
The solution could be that frontmatter is still read for ERB files.
Describe alternatives you've considered
Alternatively, if there's a way to set variables in the ERB so that they are accessible externally (in the same way that frontmatter variables could be used to create the table of contents) then that would be fine - just need a way to consume variables consistently from 'outside'.
I should also add....
I've been down a bit of a wormhole here. The real reason I was changing things around in the first place was I was looking for the ability to consume variables from the options.landing_pages.variables block inside the frontmatter of my non-ERB original landing page. If I could do this, my ask here wouldn't be necessary!
Config options:
landing_pages: {
...,
variables: {
product_version: "1.2.3"
}
}
Landing page:
---
title: GraphQL API reference for version <%= product_version %>
---
If you're new to GraphQL...
Is your feature request related to a problem? Please describe.
I've been using landing page overrides for a while. As per the built-in landing pages, I've used frontmatter to set the
title.I've just needed to convert one to ERB (so added a
.erbsuffix so the ERB processor runs on it). At this point the frontmatter stops being read, and I instead get the frontmatter inserted at the beginning of the output page (and the variable is no longer accessible for making table of contents etc).Describe the solution you'd like
The solution could be that frontmatter is still read for ERB files.
Describe alternatives you've considered
Alternatively, if there's a way to set variables in the ERB so that they are accessible externally (in the same way that frontmatter variables could be used to create the table of contents) then that would be fine - just need a way to consume variables consistently from 'outside'.
I should also add....
I've been down a bit of a wormhole here. The real reason I was changing things around in the first place was I was looking for the ability to consume variables from the
options.landing_pages.variablesblock inside the frontmatter of my non-ERB original landing page. If I could do this, my ask here wouldn't be necessary!Config options:
Landing page: