Reputation: 198
With Jekyll, I know you can include a variable in the include line, like so:
---
layout: default
testVar: test1
---
{% include test_block.html testDivContent=page.testVar %}
Is it possible to include another file that passes in the variable content (in this case testVar: test1
) from an external file?
So something like
---
layout: default
---
{% include testVar_file.html %}
{% include test_block.html testDivContent=page.testVar %}
Where testVar_file.html contains the variable testVar: test1
Upvotes: 2
Views: 592