Implement mainSections for home page and replace .Data.Pages with alias .Pages.
This commit is contained in:
parent
97eac46006
commit
a942441544
3 changed files with 13 additions and 7 deletions
|
|
@ -3,7 +3,7 @@
|
|||
<h1 class="title">Micro posts</h1>
|
||||
<p class="micro__follow"><a href="https://micro.blog/{{ with $.Param "microusername" }}{{ . }}{{ end }}">{{ i18n "string_follow" }} @{{ with $.Param "microusername" }}{{ . }}{{ end }}</a></p>
|
||||
|
||||
{{ $paginator := .Paginate (.Data.Pages) -}}
|
||||
{{ $paginator := .Paginate (.Pages) -}}
|
||||
{{ range $paginator.Pages -}}
|
||||
{{ .Render "summary"}}
|
||||
{{ end -}}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{{ $list := .Data.Pages -}}
|
||||
{{ $list := .Pages -}}
|
||||
{{ $length := (len $list) -}}
|
||||
{
|
||||
"version" : "https://jsonfeed.org/version/1",
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
{{ with .OutputFormats.Get "RSS" -}}
|
||||
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
|
||||
{{ end -}}
|
||||
{{ range .Data.Pages }}
|
||||
{{ range .Pages }}
|
||||
<item>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
|
||||
|
|
|
|||
Loading…
Reference in a new issue