Hugo内容
This commit is contained in:
21
Hugo/themes/nostyleplease/layouts/posts/list.html
Normal file
21
Hugo/themes/nostyleplease/layouts/posts/list.html
Normal file
@@ -0,0 +1,21 @@
|
||||
{{ define "main" }}
|
||||
|
||||
<h1>{{ .Title }}</h1>
|
||||
|
||||
{{ .Content }}
|
||||
|
||||
<!-- divide post list by year -->
|
||||
{{ if .Site.Params.theme_config.isListGroupByDate }}
|
||||
{{ range .Pages.GroupByDate "2006 Year" }}
|
||||
<p>{{ .Key }}</p>
|
||||
<ul>
|
||||
{{ range .Pages }}
|
||||
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ partial "post_list.html" (dict "context" . "section" .Section)}}
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user