feat(layouts): add main template for latest posts
This commit is contained in:
parent
23ca72070a
commit
7ac23ec03b
1 changed files with 13 additions and 0 deletions
13
layouts/index.html
Normal file
13
layouts/index.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
{{ define "main" }}
|
||||
<h1>{{ .Title }}</h1>
|
||||
<p>{{ .Description }}</p>
|
||||
|
||||
<h2>Latest Posts</h2>
|
||||
<ul>
|
||||
{{ range where .Site.RegularPages "Section" "posts" }}
|
||||
<li>
|
||||
<a href="{{ .Permalink }}">{{ .Title }}</a> - {{ .Date.Format "2006-01-02" }}
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
Loading…
Reference in a new issue