Home United States USA — software Using Variables in Jekyll To Define Custom Content

Using Variables in Jekyll To Define Custom Content

128
0
SHARE

Read this article to learn how a recent « happy accident » led to a discovery of how to use Jekyll’s config.yml to store custom variables.
I have a habit of constantly tinkering with my blog, and every now and then, it leads to a happy accident. I recently discovered that I can use Jekyll’s config.yml to store custom variables. You may have already known about this, and I’m probably not the first to make this discovery, but I’m very excited about the possibilities. The reason for the tinkering which led to the discovery is this: if you visit this website’s home page, about page, and footer section, you’ll notice that they all have some content in common. Specifically, my tag line and bio are used in many places, and copy-pasting them every time I change them is annoying and error-prone. On more than one occasion, my bio has been different on different pages of the website.

Continue reading...