I want something like:
---
my_var: "foo.bar.baz"
---
{{- site.data[page.my_var] -}}
Unfortunately, it doesn’t work…
I know that I can use site.data.foo.bar.baz
or site.data["foo"]["bar"]["baz"]
, but it’s not that.
Also I know that I can split page.my_var
to substrings and use them then as site.data["foo"]["bar"]["baz"]
. But this increases Jekyll build time.
I guess I need some Ruby plugin, but don’t know one and I don’t know Ruby to write one.
If you know such plugin or can help me write one or know some native workaround, this would be sooo great!
Help