diff --git a/site/docs/templates.md b/site/docs/templates.md index a7c1980e..8ecff675 100644 --- a/site/docs/templates.md +++ b/site/docs/templates.md @@ -192,6 +192,19 @@ Jekyll expects all include files to be placed in an `_includes` directory at the root of your source directory. This will embed the contents of `/_includes/footer.html` into the calling file. +
+
ProTip™: Use variables as file name
+

+ + The name of the file you wish to embed can be literal (as in the example above), + or you can use a variable, using liquid-like variable syntax as in + {% raw %}{% include {{my_variable}} %}{% endraw %}. + + Note that unlike usual liquid variable syntax, you cannot have spaces inside the curly braces. + +

+
+ You can also pass parameters to an include: {% highlight ruby %}