feat: support merging frontmatter with tp.file.include#1643
feat: support merging frontmatter with tp.file.include#1643Zachatoo merged 6 commits intoSilentVoid13:masterfrom
tp.file.include#1643Conversation
|
For details on how this feature works:
|
|
Btw I think there is a fundamental issue with the config system in Templater. When you have nested calls such as a This essentially means that In this case it means if you have a template which is includes another template that creates a file, the frontmatter of the template which creates the file won't be merged into the frontmatter of the root template. |
|
I've fixed the config issue by creating a new instance of the modules in |
|
@Zachatoo have you had a chance to review this? |
|
Sorry I have not! I'll need to do some testing with this, hopefully I'll have time this weekend |
|
Any chance this PR can be merged since it has no conflicts ? Just tested and it works flawlessly. Thanks @AndyEveritt |
|
@Zachatoo would it be possible to merge this pr? |
There was a problem hiding this comment.
@AndyEveritt Can you also update the docs in documentation.toml to briefly describe how frontmatter will be merged from included templates? Search for [tp.file.functions.include] in that file to find the right section.
|
@Zachatoo all your comments have been addressed |
|
@AndyEveritt There have been several reports of other plugins breaking with this latest update (chhoumann/quickadd#1085, chhoumann/quickadd#1086, #1695). There may be others that I haven't seen yet. I'm going to revert this change for now as I don't have time to try to fix this. Feel free to put up another PR with your changes that has backwards compatibility. |
…)" This reverts commit db9a91e.
This adds support for merging template frontmatter when using
tp.file.includeeg:
RootSubSub 2The expected output for this template is
This also works with
tp.file.create_new()and files created with Bases