{{ define "main" }}
<div class="container">
  <h1 class="page-title">{{ .Title }}</h1>

  {{ .Content }}

  <div class="posts-list">
    {{ range .Pages }}
    <article class="post-entry">
      <header class="entry-header">
        <h2 class="entry-title">
          <a href="{{ .Permalink }}" rel="bookmark">
            {{ .Date.Format "Jan 2, 2006" }} - {{ .Title }}
          </a>
        </h2>
      </header>

      {{ with .Description }}
      <div class="entry-summary">
        {{ . }}
      </div>
      {{ end }}
    </article>
    {{ end }}

    {{ if eq (len .Pages) 0 }}
    <p>No TIL posts yet.</p>
    {{ end }}
  </div>
</div>
{{ end }}