{{ define "main" }}
<article class="post">
  <header class="post-header">
    <h1 class="post-title">{{ .Title }}</h1>
    <div class="post-meta">
      <time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "January 2, 2006" }}</time>
      {{ if .Params.author }}
        <span class="post-author">{{ .Params.author.name }}</span>
      {{ end }}
      <div class="post-categories">
        <a href="/categories/general" class="category">General</a>
      </div>
    </div>
    {{ if .Params.featured_image }}
      <img src="{{ .Params.featured_image }}" alt="{{ .Title }}" class="featured-image">
    {{ end }}
  </header>

  <div class="post-content">
    {{ .Content }}
  </div>

  {{ if .Params.tags }}
    <div class="post-tags">
      {{ range .Params.tags }}
        <a href="/tags/{{ .slug }}" class="tag">#{{ .name }}</a>
      {{ end }}
    </div>
  {{ end }}
</article>
{{ end }}