Commit cc878052 authored by Rajesh Shenoy's avatar Rajesh Shenoy Committed by GitHub

Merge pull request #23 from mroote/master

Fix untyped nil error
parents f875ca6d 969199e9
......@@ -5,15 +5,17 @@
{{ if ne .Params.showpagemeta false }}
<div class="col-md-12">
<h6 class="text-left meta">
PUBLISHED ON {{ .Date.Format .Site.Params.dateformat | upper }}
PUBLISHED ON {{ .Date.Format .Site.Params.dateformat | upper }}
{{ if isset .Params "categories" }}
{{ $total := len .Params.categories }}
{{ if gt $total 0 }}
{{ $total := sub $total 1 }}
{{ range $i, $cat := sort $.Params.categories }}
<a class="meta" href="{{ "/categories/" | relURL }}{{ $cat | urlize }}">{{ $cat | upper }}</a>{{ if lt $i $total }}, {{ end }}
{{ end }}
{{ end }}
{{ end }}
</h6>
</div>
{{ end }}
......@@ -27,14 +29,16 @@
{{ if ne .Params.showpagemeta false }}
<div class="col-md-12">
<h6 class="text-right meta">
{{ if isset .Params "tags" }}
{{ $total := len .Params.tags }}
{{ if gt $total 0 }}
TAGS:
TAGS:
{{ $subtotal := sub $total 1 }}
{{ range $i, $tag := sort $.Params.tags }}
<a class="meta" href="{{ "/tags/" | relURL }}{{ $tag | urlize }}">{{ $tag | upper }}</a>{{ if lt $i $subtotal }}, {{ end }}
{{ end }}
{{ end }}
{{ end }}
</h6>
</div>
{{ end }}
......
......@@ -4,8 +4,9 @@
<li class="list-entry">
<a class="list-entry-link" href="{{ .Permalink }}">{{ .Title }}</a>
<p class="meta">
{{ .Date.Format .Site.Params.dateformat | upper }}
{{ .Date.Format .Site.Params.dateformat | upper }}
<span class="category">
{{ if isset .Params "categories" }}
{{ $total := len .Params.categories }}
{{ if gt $total 0 }}
......@@ -14,6 +15,7 @@
<a class="category" href="{{ "/categories/" | relURL }}{{ $cat | humanize | urlize }}">{{ $cat | upper }}</a>{{ if lt $i $total }}, {{ end }}
{{ end }}
{{ end }}
{{ end }}
</span>
</p>
<p class="excerpt">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment