I have a file called default.html in my layouts folder. In default.html, I want to add a relative include to test.html, which is also in my layouts folder.
I add {% include_relative test.html }% in my default.html file to include test.html. However, when I do this, I get an error that says
"Liquid Exception: Included file './test.html' not found in
projects/[projectnmae]/layouts/default.html"
I do have my layouts folder in a different location, as specified in my configuration file. Any ideas if include_relative works in a special way here that I'm not grasping?
You can't use the include_relative tag with any files inside your layouts folder. You can only use include_relative on a page or post.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With