Reputation: 924
I want to have my variable assignments placed in a single txt file or similar in jekyll, and have them included in my Front Matter for assignment. So instead of this:
---
variable1: abc
variable2: 123
---
I can have this:
---
{% include variables.txt %}
---
The purpose of this is to have a website that is editable by a technologically inexperienced client. I want to abstract out the core site structure from the things that need to be edited as much as possible - without setting up a CMS, or moving into a dynamic site (so it can still be hosted on github pages)
Upvotes: 0
Views: 85
Reputation: 23854
You could just throw all of your variables into your _config.yml
file and then they can be accessed like this:
{{ site.variable1 }}
Upvotes: 1