all repos — archie @ 117d3373f55e99b31a4a2f35b1cf951928e0bfad

A minimal Hugo Theme

Merge pull request #11 from samhattangady/master

Fix tags issue. Use the list.html code for term.html template
Athul Cyriac Ajay athul8720@gmail.com
Wed, 22 Jul 2020 15:29:03 +0530
commit

117d3373f55e99b31a4a2f35b1cf951928e0bfad

parent

4d4a11ed15fb863b81e6f1345d1eea24414c6f23

1 files changed, 16 insertions(+), 14 deletions(-)

jump to
M layouts/_default/term.htmllayouts/_default/term.html

@@ -1,15 +1,17 @@

-<!DOCTYPE html> -<html> -{{ partial "header.html" . }} - -<body> - <div class="container wrapper tags"> - {{ partial "head.html" . }} - - <h1 class="page-title">All tags</h1> - </div> - - {{ partial "footer.html" . }} -</body> +{{ define "main" }} +{{ if isset .Data "Term" }} +<h1>Entries tagged - "{{ .Data.Term }}"</h1> +{{ else }} +<h1 class="page-title">All articles</h1> +{{ end }} -</html>+<ul class="posts"> + {{- range .Data.Pages -}} + {{- if (not (in (.Site.Params.excludedTypes | default (slice "page")) .Type)) -}} + <li class="post"> + <a href="{{ .RelPermalink }}">{{.Title}}</a> <span class="meta">{{ dateFormat "Jan 2, 2006" .Date }}{{ if .Draft }} <span class="draft-label">DRAFT</span> {{ end }}</span> + </li> + {{- end -}} + {{- end -}} +</ul> +{{ end }}