You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 13, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on May 13, 2026. It is now read-only.
Make data inheritance work for multilevel file includes #9
Hi @dmolsen, firstly thanks for your plugin.
I am using this plugin in project and facing an issue with data-inheritance. This does not work for multilevel file includes, when the sub-included files are lexicographically greater.
This could be solved using numeric prefix in filenames, but I would really like to avoid that.
For eg. let say we have three patterns in atoms directory:
a.twig
This is a.twig {{ data1 }} {% include 'atoms-b' %}
a.json
{ "data1": "hello from A" }
b.twig
This is b.twig {{ data2 }} {% include 'atoms-c' %}
b.json
{ "data2": "hello from B" }
c.twig
This is c.twig {{ data3 }}
c.json
{ "data3": "hello from C" }
In this case, pattern a will inherit data for only first level include i.e for b, and not for the c. As b is processed later by the plugin.
This can be easily solved by recursively processing the patterns with lineage first, keeping track of the processed patterns at the same time.
Let me know what you think about this, I'll be happy to submit a PR for this.
hey @vikalp-sajwan, thanks for this. Just a heads up @dmolsen isn't an active maintainer on this project anymore. Another heads up is that there's a chance this plugin isn't relevant anymore (@EvanLovely can you confirm?).
Hi @bradfrost, thanks for your response. This plugin is very much relevant for a project I am working on.
I made the PR of the code that we are using, #10. Please, review and merge if seems relevant.
Activity
bradfrost commentedon May 24, 2019
hey @vikalp-sajwan, thanks for this. Just a heads up @dmolsen isn't an active maintainer on this project anymore. Another heads up is that there's a chance this plugin isn't relevant anymore (@EvanLovely can you confirm?).
vikalpsajwan commentedon May 28, 2019
Hi @bradfrost, thanks for your response. This plugin is very much relevant for a project I am working on.
I made the PR of the code that we are using, #10. Please, review and merge if seems relevant.
bradfrost commentedon May 31, 2019
Thanks @vikalp-sajwan!
@EvanLovely, would you be able to take a look at this PR?