{{ define "main" }}
<article class="post">
  <header>
    <h2>{{ .Title }}</h2>
    <p>
      Von {{ .Params.Author }}
    </p>
    <p>
      Veröffentlichung am {{ .Date.Format "2.01.2006" }}
      <span class="tags">
        in
        {{- range .Params.tags }}
         <a class="tag" href="/tags/{{ . | urlize }}">{{ . }}</a>
        {{ end }}
      </span>
    </p>
    <p>
      {{ math.Round (div (countwords .Content) 200.0) }} Minuten ({{ countwords .Content }} Wörter) bei 200 p/m
    </p>
  </header>

  <section class="body">
    {{ if isset .Params "image" }}
      <img alt="{{ .Params.alt_text }}" src="{{ .Params.image }}">
    {{ end }}
    {{ .Content }}
  </section>
  <section class="related">
  {{ $related := .Site.RegularPages.Related . | first 5 }}
      {{ with $related }}
      <h3>Mehr dazu</h3>
      <ul>
        {{ range . }}
        <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
        {{ end }}
      </ul>
  {{ end }}
  </section>
  
</article>
  {{ if not .Params.disableComments }}
    <!--term="{{ .Title }}"-->
    <script src="https://giscus.app/client.js"
          data-repo="kurrrioo/Frikandel-speciale"
          data-repo-id="R_kgDOMeh49A"
          data-category="Show and tell"
          data-category-id="DIC_kwDOMeh49M4CyAGs"
          data-mapping="title"
          data-strict="0"
          data-reactions-enabled="1"
          data-emit-metadata="0"
          data-input-position="bottom"
          data-theme="light"
          data-lang="de"
          crossorigin="anonymous"
          async>
    </script>
  {{ end }}

{{ end }}