summaryrefslogtreecommitdiff
path: root/layouts/blog/single.html
blob: 035db0ac66ecde702ed46a1d8f9e5c1b43f332c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{{ define "main" }}
  <article id="blog-post">
    <header>
      <h1>{{ .Title }}</h1>

      <div id="blog-post-details">
        <span id="date">
          Published on
          {{ .Date.Format "2" }}{{ if in (slice 1 21 31) .Date.Day}}st{{ else if in (slice 2 22) .Date.Day}}nd{{ else if in (slice 3 23) .Date.Day}}rd{{ else }}th{{ end }}
          {{ .Date.Format "January" }}
          {{ .Date.Format "2006" }}
        </span>

        <span id="reading-time">
          Approx
          {{ .ReadingTime }}
          minute{{ if (ne .ReadingTime 1) }}s{{ end }}
          read
        </span>
      </div>

      <hr>
    </header>

    {{ .Content }}
  </article>
{{ end }}