liquid - Jekyll for loop can't work as expected -


i created new page, there loop display list of posts, can't work expcted enter image description here

and here code:

<!doctype html> <html> <head>     <title></title> </head> <body> <ul>   {% post in site.posts %}     <li>       <a href="{{ post.url }}">{{ post.title }}</a>       {{ post.excerpt }}     </li>   {% endfor %} </ul> </body> </html> 

add front matter jekyll knows has process it.

simply add 2 lines of dashes @ beginning of file:

--- --- <!doctype html>  <html>  <head> <title></title> </head>  <body>  <ul>  {% post in site.posts %}  <li> <a href="{{ post.url }}">{{ post.title }}</a> {{ post.excerpt }} </li>  {% endfor %}  </ul>  </body>  </html> 

Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -