I have a theme and for a post page, I'm showing the image
value if there is one.
I also have a plugin that renders a YouTube video and usage is like this: {% youtube id_12345 %}
.
In my template file, would it be possible to reference the video
value from the front-matter of a post and render it with the same plugin that I can use in my content?
Something like:
{% if post.video %}
{% youtube {{post.video}} %} # <-- this does not work
{% elsif post.image %}
<img src="{{ post.image }}" class="post-image" alt="{{ post.title }}">
{% endif %}
Thanks!