hyde-hyde
hyde-hyde copied to clipboard
Change home page layout to /posts
Hi
I'd like to change how home page is looking. Particularly, I'd like it to look the same way /posts page is looking
It feels to me that I need to replace in /layouts/index.html the following code:
{{ define "content" }}
<div class="post-list">
{{ $paginator := .Paginate (where .Site.RegularPages "Type" "in" site.Params.mainSections) }}
{{ range $paginator.Pages }}
{{ if .Draft }}
{{ .Scratch.Set "draftPage" true }}
{{ else }}
{{ .Scratch.Set "draftPage" false }}
{{ end }}
<div class="post-list__item">
<span class="item__title--big">
<a href="{{ .RelPermalink }}" {{if .Scratch.Get "draftPage" }}class="draft"{{end}}>{{ .Title }}</a>
</span>
<span class="item__date">
{{ .Date.Format (.Site.Params.dateformat | default "Jan 02, 2006") }}
</span>
<span {{if .Scratch.Get "draftPage" }}class="draft"{{end}}>
{{ if .Description }}
{{ .Description }}
{{ else }}
{{ .Summary }}
{{ end }}
</span>
{{ if .Truncated }}
... <a class="read-more-symbol" href="{{ .RelPermalink }}">➦</a>
{{ end }}
</div>
{{ .Scratch.Delete "draftPage" }}
{{ end }}
</div>
{{ partial "pagination.html" . }}
{{ end }}
with the code from the page that is used on /posts screen.
Could you please help me to achieve that? I tried to find what is used on a /post page with no luck so far
Where the content of /posts page is located?
Thank you