Welcome to mirror list, hosted at ThFree Co, Russian Federation.

article.html « partials « layouts - github.com/htdvisser/hugo-base16-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 834cbdbfae19ccdddb37ca42d87232da8d04a207 (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
29
30
{{ $baseurl := .Site.BaseURL }}{{ $dateMissing := eq .Date.Year 1}}
<article class="single" itemscope itemtype="http://schema.org/BlogPosting">
  <div class="meta">
{{ if eq $dateMissing false }}
    <span class="key">published on</span>
    <span class="val"><time itemprop="datePublished" datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "January 02, 2006" }}</time></span>
{{ end }}
{{ with .Params.categories }}
    <span class="key">{{ if eq $dateMissing true }}published {{ end }}in</span>
    <span class="val">
{{ range . }}
        <a href="{{ $baseurl }}categories/{{ . | urlize }}">{{ . }}</a>
{{ end }}
    </span>
{{ end }}
{{ with .Params.tags }}
    <br>
    <span class="key">tags:</span>
    <span class="val">
{{ range . }}
        <a href="{{ $baseurl }}tags/{{ . | urlize }}">{{ . }}</a>
{{ end }}
    </span>
{{ end }}
  </div>
  <h1 class="headline" itemprop="headline">{{ .Title }}</h1>
  <section class="body" itemprop="articleBody">
    {{ .Content }}
  </section>
</article>