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

terms.html « _default « layouts - github.com/parsiya/Hugo-Octopress.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a3b6927e50023c01c9c38dedfb99d4c4c12ac53c (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
31
32
33
34
35
36
37
38
39
40
<!-- Template for /tags/ and /categories/ -->

{{ $page := . }}
{{ $data := .Data }}
{{ $.Scratch.Set "terms" $data.Terms.ByCount }}  <!-- default is ByCount -->

{{ with .Site.Params.generateTaxonomyList }}

  {{ partial "header.html" $page }}
  <div id="main">
    <div id="content">
      <div>
        <article role="article">
          <header>
            <h1 class="entry-title">
              {{ $.Title }}:
            </h1>
          </header>
          <ul>
            {{ with $.Site.Params.sortTaxonomyAlphabetical }}
              {{ if eq . true }}
                {{ $.Scratch.Set "terms" $data.Terms.Alphabetical }}
              {{ end }}
            {{ end }}
            <!-- Non-relative paths also work - fallback in case the relative path stops working -->
            {{ range $key, $value := ($.Scratch.Get "terms") }}
              <!-- <li><a href="{{ $.Site.BaseURL }}{{ $data.Plural }}/{{ $value.Name | urlize }}">{{ humanize $value.Name }}</a> {{ $value.Count }}</li> -->
              <li><a href="{{ $value.Name | urlize }}">{{ humanize $value.Name }}</a> {{ $value.Count }}</li>
            {{ end }}
          </ul>
        </article>
      </div>

      {{ partial "sidebar.html" $page }}
    </div>
  </div>

  {{ partial "footer.html" $page }}

{{ end }}