all repos — archive/hugo-xmin @ 217445ac814209a27682ff5bdb71adb89d7b58cd

Customised minimal hugo theme

layouts/_default/single.html (view raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{{ define "main" }}
<article>
  <header>
    <h1><span class="title">{{ .Title | markdownify }}</span></h1>
    {{ with .Params.author }}<h2 class="author">{{ . }}</h2>{{ end }}
    {{ if (gt .Params.date 0) }}<h2 class="date">{{ .Date.Format "2006-01-02" }}</h2>{{ end }}
    <p class="terms">
      {{ range $i := (slice "categories" "tags") }}
      {{ with ($.Param $i) }}
      {{ $i | title }}: {{ range $k := . }}<a href="{{ relURL (print "/" $i "/" $k | urlize) }}">{{$k}}</a> {{ end }}
      {{ end }}
      {{ end }}
    </p>
  </header>

  <main>
  {{ .Content }}
  </main>

  <footer>

  </footer>
</article>
{{- end }}