ruby - Is there a way to access rendered content in Jekyll? -
in jekyll, there way access rendered content of post page?
here's scenario: suppose wanted create blog index page listing bunch of posts. each post uses different layout (text, photo, tweet, etc). there way jekyll render each post layout specified inside of post , hand me rendered content can put summary page?
(i'm 97% sure saw exact question asked , answered somewhere here on stack overflow, cannot life of me find it. if point me it, grateful! of course, original solutions appreciated!)
(edited make clear want dynamic access rendered content. not after fact in _sites directory, while building site.)
post.layout
is layout of 1 post, it's default post
so, think, can this
{% post in site.posts %} {% if post.layout == 'layout1' %} something, such put array ... {% else if post.layout == 'layout2' %} // here 'else if' may not correct liquid syntax else {% endif %} {% endfor %}
Comments
Post a Comment