As opposed to the old way of including header/footer partials in every template. For some reason, /themes/<THEME>/layouts/taxonomies/tag.terms.html doesn't work as a block but the default terms template /themes/<THEME>/layouts/_default/terms.html does.master
| @@ -0,0 +1,4 @@ | |||||
| {{ partial "header" . }} | |||||
| {{ block "main" . }} | |||||
| {{ end }} | |||||
| {{ partial "footer" . }} | |||||
| @@ -1,7 +1,8 @@ | |||||
| {{ partial "header" . }} | |||||
| <h1>{{ .Title }}</h1> | |||||
| {{ range .Paginator.Pages }} | |||||
| {{ .Render "li" }} | |||||
| {{ define "main" }} | |||||
| <h1>{{ .Title }}</h1> | |||||
| {{ range .Paginator.Pages }} | |||||
| {{ .Render "li" }} | |||||
| {{ end }} | |||||
| {{ template "_internal/pagination.html" . }} | |||||
| {{ end }} | {{ end }} | ||||
| {{ template "_internal/pagination.html" . }} | |||||
| {{ partial "footer" . }} | |||||
| @@ -1,2 +1,3 @@ | |||||
| <h2>Default single template</h2> | |||||
| {{ .Content }} | |||||
| {{ define "main" }} | |||||
| {{ .Content }} | |||||
| {{ end }} | |||||
| @@ -0,0 +1,9 @@ | |||||
| {{ define "main" }} | |||||
| <h1>Default taxonomy terms template</h1> | |||||
| <h1>{{ .Title }}</h1> | |||||
| <ul class="tag-cloud"> | |||||
| {{ range $name, $taxonomy := .Site.Taxonomies.tags }} | |||||
| <li><a href="{{ "/tags/" | relURL }}{{ $name | urlize }}/">{{ $name }} ({{ $taxonomy.Count}})</a></li> | |||||
| {{ end}} | |||||
| </ul> | |||||
| {{ end }} | |||||
| @@ -1,6 +1,6 @@ | |||||
| {{ partial "header" . }} | |||||
| <div id="aside-single"> | |||||
| {{ .Content }} | |||||
| </div> | |||||
| {{ partial "postmeta" . }} | |||||
| {{ partial "footer" . }} | |||||
| {{ define "main" }} | |||||
| <div id="aside-single"> | |||||
| {{ .Content }} | |||||
| </div> | |||||
| {{ partial "postmeta" . }} | |||||
| {{ end }} | |||||
| @@ -1,4 +1,4 @@ | |||||
| {{ partial "header" . }} | |||||
| {{ partial "image" . }} | |||||
| {{ partial "postmeta" . }} | |||||
| {{ partial "footer" . }} | |||||
| {{ define "main" }} | |||||
| {{ partial "image" . }} | |||||
| {{ partial "postmeta" . }} | |||||
| {{ end }} | |||||
| @@ -1,6 +1,6 @@ | |||||
| {{ partial "header" . }} | |||||
| {{ define "main" }} | |||||
| {{ range .Paginator.Pages }} | {{ range .Paginator.Pages }} | ||||
| {{ .Render "li" }} | {{ .Render "li" }} | ||||
| {{ end }} | {{ end }} | ||||
| {{ template "_internal/pagination.html" . }} | {{ template "_internal/pagination.html" . }} | ||||
| {{ partial "footer" . }} | |||||
| {{ end }} | |||||
| @@ -1,9 +1,7 @@ | |||||
| {{ partial "header" . }} | |||||
| <article> | |||||
| <h1>{{ .Title }}</h1> | |||||
| {{ .Content }} | |||||
| </article> | |||||
| {{ partial "postmeta" . }} | |||||
| {{ partial "footer" . }} | |||||
| {{ define "main" }} | |||||
| <article> | |||||
| <h1>{{ .Title }}</h1> | |||||
| {{ .Content }} | |||||
| </article> | |||||
| {{ partial "postmeta" . }} | |||||
| {{ end }} | |||||
| @@ -1,4 +1,4 @@ | |||||
| {{ partial "header" . }} | |||||
| {{ partial "quote" . }} | |||||
| {{ partial "postmeta" . }} | |||||
| {{ partial "footer" . }} | |||||
| {{ define "main" }} | |||||
| {{ partial "quote" . }} | |||||
| {{ partial "postmeta" . }} | |||||
| {{ end }} | |||||
| @@ -1,8 +0,0 @@ | |||||
| {{ partial "header" . }} | |||||
| <h1>{{ .Title }}</h1> | |||||
| <ul class="tag-cloud"> | |||||
| {{ range $name, $taxonomy := .Site.Taxonomies.tags }} | |||||
| <li><a href="{{ "/tags/" | relURL }}{{ $name | urlize }}/">{{ $name }} ({{ $taxonomy.Count}})</a></li> | |||||
| {{ end}} | |||||
| </ul> | |||||
| {{ partial "footer" . }} | |||||
| @@ -1,5 +1,5 @@ | |||||
| {{ partial "header" . }} | |||||
| {{ partial "video-embed" .Params.embed_url }} | |||||
| {{ .Content }} | |||||
| {{ partial "postmeta" . }} | |||||
| {{ partial "footer" . }} | |||||
| {{ define "main" }} | |||||
| {{ partial "video-embed" .Params.embed_url }} | |||||
| {{ .Content }} | |||||
| {{ partial "postmeta" . }} | |||||
| {{ end }} | |||||