summaryrefslogtreecommitdiff
path: root/layouts/blog/single.html
blob: 7fd8efea2e1cb29d423f3235a4919e15286ad7c6 (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
28
{{ define "main" }}
  <article id="blog-post">
    <header>
      <h1>{{ .Title }}</h1>

      <div id="blog-post-details">
        <time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">
          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" }}
        </time>

        <span>
          Approx
          {{ .ReadingTime }}
          minute{{ if (ne .ReadingTime 1) }}s{{ end }}
          read
        </span>
      </div>

      <hr>
    </header>

    {{ .Content }}

  </article>
{{ end }}