I have an include called audio.html
which is added to a post.
I have a page of all posts which is /episodes/
and I have the latest post appearing on the homepage.
I want to get the current page url inside my audio.html include to modify the content based on whether the post is appearing on the homepage or on the episodes page.
I’ve tried {% if page.url == "/index.html %}
but this always returns the url of the post, not the page it’s currently appearing on.
Can I set a variable in my index.html
file (homepage) and read it in my audio.html
include?
I hope that makes sense.