Suppose I have a directory and file structure as shown below in the jekyll for creating the static site. In this case how can I make a loop for the dev directory so that each time i can get the content of the *.md file
static-site
|
开发者_StackOverflow中文版 content
|
dev
|
test1.md
test2.md
text3.md
locate your *.md content in your _posts folder (sub dir is fine) and then call your content with something like:
{% for post in site.categories.dev %}
{{ post.content }}
{% endfor %}
be sure to include the "dev" category to your yaml front matter.
精彩评论