mirror of
https://github.com/jekyll/jekyll.git
synced 2026-04-06 03:01:43 -04:00
Merge pull request #2870 from gjtorikian/support-relative-include
This commit is contained in:
29
test/source/_posts/2014-09-02-relative-includes.markdown
Normal file
29
test/source/_posts/2014-09-02-relative-includes.markdown
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
title: Post
|
||||
layout: post
|
||||
include1: rel_include.html
|
||||
include2: include_relative/rel_include
|
||||
include3: rel_INCLUDE
|
||||
include4: params
|
||||
include5: clude
|
||||
---
|
||||
|
||||
Liquid tests
|
||||
- 1 {% include_relative include_relative/{{ page.include1 }} %}
|
||||
- 2 {% include_relative {{ page.include2 | append: '.html' }} %}
|
||||
- 3 {% include_relative include_relative/{{ page.include3 | downcase | append: '.html' }} %}
|
||||
|
||||
Whitespace tests
|
||||
- 4 {% include_relative include_relative/{{page.include1}} %}
|
||||
- 5 {% include_relative include_relative/{{ page.include1}} %}
|
||||
- 6 {% include_relative include_relative/{{ page.include3 | downcase | append: '.html'}} %}
|
||||
|
||||
Parameters test
|
||||
- 7 {% include_relative include_relative/{{ page.include4 | append: '.html' }} var1='foo' var2='bar' %}
|
||||
|
||||
Partial variable test
|
||||
- 8 {% include_relative include_relative/rel_in{{ page.include5 }}.html %}
|
||||
|
||||
Relative to self test:
|
||||
|
||||
- 9 {% include_relative 2014-03-03-yaml-with-dots.md %}
|
||||
7
test/source/_posts/include_relative/params.html
Normal file
7
test/source/_posts/include_relative/params.html
Normal file
@@ -0,0 +1,7 @@
|
||||
<span id='include-param'>{{include.param}}</span>
|
||||
|
||||
<ul id='param-list'>
|
||||
{% for param in include %}
|
||||
<li>{{param[0]}} = {{param[1]}}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
1
test/source/_posts/include_relative/rel_include.html
Normal file
1
test/source/_posts/include_relative/rel_include.html
Normal file
@@ -0,0 +1 @@
|
||||
relative_included
|
||||
Reference in New Issue
Block a user