I have this page:
mypage/
└── index.md
└── doc.md
when I add {% include_relative doc.md %}
inside index.md
it is rendered to html perfectly.
However when I add {% include_relative doc.md %}
inside the layout file of index.md
, also the content of doc.md
is being taken, however its not rendered to html.
Can someone explain why? and is there a solution?
rdyar
March 1, 2018, 12:58am
2
have you tried the markdownify filter? I think it would be {% include_relative doc.md | markdownify %}
My guess is since last layouts are .html
they don’t process Markdown.
When I try to do this, I’m getting an error:
Liquid Exception: Invalid syntax for include tag: | markdownify Valid syntax: {% include_relative file.ext param='value' param2='value' %} in /_layouts/video.html
It seems It’s one of the long waiting feature request that hasn’t been implemented yet.
opened 12:18AM - 14 Jul 13 UTC
closed 10:13PM - 20 Jul 13 UTC
frozen-due-to-age
Is it intended that when you add `{% include a_markdown_file.md %}` from within … an HTML page, that it doesn't markdownify the include? The documentation seems to include that it should.
http://jekyllrb.com/docs/templates/#includes