mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 22:37:49 +00:00
Display only posts on front page and start category separation
This commit is contained in:
@@ -7,13 +7,17 @@
|
|||||||
you like. The source code is also available in the corresponding
|
you like. The source code is also available in the corresponding
|
||||||
<a href="https://github.com/phil-opp/blog_os">Github repository</a>.
|
<a href="https://github.com/phil-opp/blog_os">Github repository</a>.
|
||||||
</p>
|
</p>
|
||||||
<p>Latest post: {{ range first 1 .Site.Pages }}
|
<p>Latest post: {{ range first 1 (where .Site.Pages "Section" "post") }}
|
||||||
<strong><a href="{{ .RelPermalink }}">{{ .Title }}</a></strong>
|
<strong><a href="{{ .RelPermalink }}">{{ .Title }}</a></strong>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</p></div>
|
</p></div>
|
||||||
|
|
||||||
<div class="posts">
|
<div class="posts">
|
||||||
{{ range .Site.Pages.ByDate }}
|
{{ range first 4 (where .Site.Pages.ByDate "Section" "post") }}
|
||||||
|
{{ .Render "teaser" }}
|
||||||
|
{{ end }}
|
||||||
|
<hr>
|
||||||
|
{{ range first 4 (after 4 (where .Site.Pages.ByDate "Section" "post")) }}
|
||||||
{{ .Render "teaser" }}
|
{{ .Render "teaser" }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user