about summary refs log tree commit diff
path: root/layouts/partials/post-info.html
blob: 32b918bb48fac9df598826808ef7fea73ac4b4b6 (plain) (blame)
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
<div class="post-info">
    {{ with .Params.date }}
    <div>
        <time>{{ .Format "2006-01-02" }}</time>
    </div>
    {{ end }}


    <div class="post-taxonomies">
        {{ if .Params.categories }}
        Categories:
        <ul class="post-categories">
            {{ range $cat_name := .Params.categories }}
            {{ $cat := ($.Site.GetPage (printf "/categories/%s" $cat_name | urlize )) }}
            <li><a href="{{ $cat.Permalink }} ">{{ $cat_name }}</a></li>
            {{ end }}
        </ul>
        {{ end }}
        <br>
        {{ if .Params.tags }}
        Tags:
        <ul class="post-tags">
            {{ range $tag_name := .Params.tags }}
            {{ $tag := ($.Site.GetPage (printf "/tags/%s" $tag_name | urlize )) }}
            <li><a href="{{ $tag.Permalink }}">#{{ $tag_name }}</a></li>
            {{ end }}
        </ul>
        {{ end }}
    </div>
</div>