Ну, это, наверное, глупый вопрос, но мне интересно, есть ли способ создать сгенерированную разметку в Jekyll, чтобы сохранить отступ жидкого тега. Мир не заканчивается, если он не разрешима. Мне просто интересно, потому что мне нравится, чтобы мой код выглядел аккуратно, даже если он был скомпилирован.:)
Например, у меня есть следующие два:
base.html:
<body>
<div id="page">
{{content}}
</div>
</body>
index.md:
---
layout: base
---
<div id="recent_articles">
{% for post in site.posts %}
<div class="article_puff">
<img src="/resources/images/fancyi.jpg" alt="" />
<h2><a href="{{post.url}}">{{post.title}}</a></h2>
<p>{{post.description}}</p>
<a href="{{post.url}}" class="read_more">Read more</a>
</div>
{% endfor %}
</div>
Проблема заключается в том, что импортированный тег {{content}} отображается без использования указанного выше значения.
Итак, вместо
<body>
<div id="page">
<div id="recent_articles">
<div class="article_puff">
<img src="/resources/images/fancyimage.jpg" alt="" />
<h2><a href="/articles/2012/11/14/gettin-down-with-rwd.html">Gettin' down with responsive web design</a></h2>
<p>Everyone talking about it. Your client wants it. You need to code it.</p>
<a href="/articles/2012/11/14/gettin-down-with-rwd.html" class="read_more">Read more</a>
</div>
</div>
</div>
</body>
Я получаю
<body>
<div id="page">
<div id="recent_articles">
<div class="article_puff">
<img src="/resources/images/fancyimage.jpg" alt="" />
<h2><a href="/articles/2012/11/14/gettin-down-with-rwd.html">Gettin' down with responsive web design</a></h2>
<p>Everyone talking about it. Your client wants it. You need to code it.</p>
<a href="/articles/2012/11/14/gettin-down-with-rwd.html" class="read_more">Read more</a>
</div>
</div>
</div>
</body>
Похоже, что только первая строка имеет отступы правильно. Остальное начинается в начале строки... Итак, многострочный импорт жидких шаблонов?:)