Closed oscarotero closed 3 weeks ago
From discord conversation
mergedKeys allows to configure the merging strategy of some variables. This behavior should be applied also to layouts.
Use case:
I have a layout that needs a CSS file, and depends on other layout
--- layout: layouts/base.vto css_file: /styles1.css --- <main> {{ content }} </main>
The other layout has also a css_file:
--- css_file: /styles-base.css --- <html> <head> {{ for style of css_file }} <link rel="stylesheet" href="{{ style }}"> {{ /for }} </head> <body> {{ content }} </body> </html>
The idea is to use the stringArray mode for css_file variable. It works with pages and _data files but not in layouts.
stringArray
css_file
_data
Enter your suggestions in details:
From discord conversation
mergedKeys allows to configure the merging strategy of some variables. This behavior should be applied also to layouts.
Use case:
I have a layout that needs a CSS file, and depends on other layout
The other layout has also a css_file:
The idea is to use the
stringArray
mode forcss_file
variable. It works with pages and_data
files but not in layouts.