From afd30b0a9bab61ad093b463a35e6a316099498c0 Mon Sep 17 00:00:00 2001 From: Garen Torikian Date: Sun, 7 Sep 2014 12:14:19 -0700 Subject: [PATCH] Add documentation on the include_relative tag --- site/_docs/templates.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/site/_docs/templates.md b/site/_docs/templates.md index 5ace04fc..75336eb2 100644 --- a/site/_docs/templates.md +++ b/site/_docs/templates.md @@ -281,6 +281,17 @@ These parameters are available via Liquid in the include: {% raw %}{{ include.param }}{% endraw %} {% endhighlight %} +### Including files relative to another file + +You can also choose to include files relative to the current file: + +{% highlight ruby %} +{% raw %}{% include_relative somedir/footer.html %}{% endraw %} +{% endhighlight %} + +You won't need to place your included content within the `_includes` directory. +All the other capaibilities of the `include` tag are available to the `include_relative` tag. + ### Code snippet highlighting Jekyll has built in support for syntax highlighting of [over 100