
{{ $pages := .Pages }}
{{ if .IsHome }}
{{ $pages = .Site.RegularPages }}
{{ end }}
{{ $paginator := .Paginate $pages }}

{{ range .Paginator.Pages }}
  {{ $url := replace .Permalink .Site.BaseURL "" }}

  {{ if or (eq .Type "microposts") (eq .Type "micropost") }}
    {{ partial "preview_micropost.html" . }}
  {{ end }}

  {{ if or (eq .Type "photos") (eq .Type "photo") }}
    {{ partial "preview_photo_post.html" . }}
  {{ end }}

  {{ if or (eq .Type "posts") (eq .Type "post") }}
    {{ partial "preview_post.html" . }}
  {{ end }}

{{ end }}

{{ partial "pagination.html" . }}
