Why is this important? I am creating something new. The problem is not related to a specific youtube plugin. The Variable has the correct value but is not usable within a plugin.
When using the plugin with the id instead of the variable holding the id its working.
hm, it was my understanding that the build process would substitute the variable for the plugin and the plugin would never see the variable. The plugin has now idea about the context in which it was called.
In my case I am looping over a list from a data file
{% for video in entry.video %}
{% youtube {{ video.number }} %}
{% endfor %}
That works if the plugin allows for variables/front matter… and they don’t all do that. That is why it’s important that we know which Jekyll Youtube plugin you’re using.
For example this plugin does support support variables/front matter (at least from the what their documentation says).
Jekyll’s documentation on writing a plugin has links to the various types of plugins (converters, tags, filters, etc.) and best practices to keep in mind.
ok, could we continue the discussion without general pointers to general pages that do not answer my questions? I understand that nobody wants to do the searching for somebody else.
I have read most of the jekyll documents about plugins, done googling for 10 pages but I still have not found advice /examples / snippets that describe how to write a plugin so that you can pass content to a plugin via a variable.