mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2025-06-12 09:47:29 -05:00
Add latest posts section to the bottom of every content page
This commit is contained in:
21
layouts/partials/latest-posts.html
Normal file
21
layouts/partials/latest-posts.html
Normal file
@ -0,0 +1,21 @@
|
||||
<div class="latest-posts full-width-page-list">
|
||||
<hr>
|
||||
<h1>
|
||||
{{ i18n "latest_posts" }}
|
||||
{{ partial "rss-link.html" .Site.Home }}
|
||||
</h1>
|
||||
|
||||
{{ with .Site.RegularPages | first 5 }}
|
||||
<div class="page-list">
|
||||
<ul>
|
||||
{{ range . }}
|
||||
<li>{{ .Render "summary/post" }}</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
{{ else }}
|
||||
<div>
|
||||
{{ i18n "no_posts" }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
Reference in New Issue
Block a user