{{ define "main" }}
  <div id="{{ lower .Title }}" class="page category">
    <div>
      <h1>{{ .Title }}</h1>
      {{ with .Summary }}
        <p>{{ . }}</p>
      {{ end }}
    </div>
    {{ if ne .Params.image nil }}
      {{ $path := print ".." .Params.image }}
      <img src="{{ $path }}" alt="{{ lower .Title }}_image">
    {{ else }}
      @TODO: 404 image goes here
    {{ end }}
  </div>
  {{ with .Content }}
    <div id="content" class="page">
      {{ . }}
    </div>
  {{ end }}
  <div id="posts" class="directory">
    {{ range .Paginator.Pages }}
    <a href="{{ .RelPermalink }}">
      <article class="post">
        <h2>{{ .LinkTitle }}</h2>
        <p>{{ .Summary }}</p>
      </article>
    </a>
    {{ end }}{{ template "_internal/pagination.html" . }}
  </div>
{{ end }}
