There seems to be an issue with recursion in resolving Twig variables in the frontmatter:
I have a hierarchy of variable from which I want to generate variables with Twig in the frontmatter so I can set the ingredients in the frontmatter und use them in the markdown with inline twig. The reason is that I need to show the whole hierarchy of variables in the text and they should be easily changeable in the future by only changing the key variables and not all the plain text / Markdown, example:
guide/default.md:
---
title: 'Guide'
process:
markdown: true
twig: true
version_build: '2017-10-18-01'
version_infix: '1742'
gen_file_prefix: "gen-GEN_T{{page.header.version_infix}}_{{page.header.version_build}}"
abc_file_prefix: "{{page.header.gen_file_prefix}}-vbox-images"
abc_archive_name: "{{page.header.abc_file_prefix}}.tar.gz"
---
... further down the line:
This guide is based on the following versions / archives:
```
Gen: {{page.header.gen_file_prefix}}
Alpha Bravo Charlie folder name: {{page.header.abc_file_prefix}}
Alpha Bravo Charlie file name: {{page.header.abc_archive_name}}.tar.gz
```
I have also added to system.yaml:
frontmatter:
process_twig: true
And created frontmatter.yaml with:
process:
twig: true
My problem is that the above breaks after 2 levels of resolving the variables, i.e. the above will render to
Gen: gen-GEN_T1742_2017-10-18-01 <-- correct, 1 level resolved
Alpha Bravo Charlie folder name: gen-GEN_T1742_2017-10-18-01-vbox-images <-- correct, 2 levels resolved
Alpha Bravo Charlie file name: gen-GEN_T{{page.header.version_infix}}_{{page.header.version_build}}-vbox-images.tar.gz <-- problem: recursion breaks after 2 levels, last level of variables not resolved.
Is there a way to fix this and make the variable resolution go deeper?
If not, what is a good alternative way of achieving such multiple levels of generating strings being inserted into the markdown while showing the whole hierarchy of these generated strings in the end on the page (it’s a tech tutorial) and making it easy to change the “ingredients” to the hierarchy of strings, such as dates, version numbers etc.?