include_relative post.path jekyll

621 views Asked by At

I'm trying to put a number of related posts on a single page. The problem is that the included posts are all textile pages, using some {% highlight %} tags. When I try to include then via post.content, they don't get textilized (e.g, I see "{% highlight..." on the page).

I've tried a few different things:

This never gets textilized:

{% for post in site.tags.my_tag %}
{{ post.content | textilize }}
{% endfor %}

This (based on http://nateeagle.com/2011/08/31/jekyll-not-parsing-includes/) returns no content:

{% for post in site.tags.apidocs %}
{% capture included_post %}
{{% include_relative post.path %}}
{% endcapture %}
{{ included_post | textilize }}
{% endfor %}

Any ideas?

Bradley

1

There are 1 answers

2
David Jacquel On BEST ANSWER

Try

{% include_relative {{post.path}} %}