{{ define "main" -}}
<div class="posts">
{{ range .Site.RegularPages -}}
<article class="post">
  <h1 class="post-title">
    <a href="{{ .Permalink }}">{{ .Title }}</a>
  </h1>
  <time datetime="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}" class="post-date">{{ .Date.Format "Mon, Jan 2, 2006" }}</time>
  {{ .Summary }}
  {{ if .Truncated }}
  <div class="read-more-link">
    <a href="{{ .RelPermalink }}">Read More…</a>
  </div>
  {{ end }}
</article>
{{- end }}
</div>
{{- end }}

{{ define "main" -}}
<div class="posts">
{{ range .Site.RegularPages -}}
{{ if .Date }}
<article class="post">
  <h1 class="post-title">
    <a href="{{ .Permalink }}">{{ .Title }}</a>
  </h1>
  <time datetime="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}" class="post-date">{{ .Date.Format "Mon, Jan 2, 2006" }}</time>
  {{ .Summary }}
  {{ if .Truncated }}
  <div class="read-more-link">
    <a href="{{ .RelPermalink }}">Read More…</a>
  </div>
  {{ end }}
</article>
{{- end }}
</div>
{{- end }}
{{- end }}

Exclude pages without date from main loop
themes/hyde: Exclude pages without date from main loop

This allows having standalone pages at the top level without them showing up in the blog post list

Signed-off-by: Harsh Shandilya <c6ff3190142d3f8560caed342b4d93721fe8dacf@gmail.com>
