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

github.com/vimux/blank.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvimux <vimux@protonmail.com>2019-07-31 00:32:26 +0300
committervimux <vimux@protonmail.com>2019-07-31 15:49:20 +0300
commitc8bf719e3d4a4c6ed1e70c5091f72e542ffc7a3d (patch)
treed81f0d69cedfc20638d42e88b19b08f23d8632da /layouts/_default/list.html
parentc71d33abd2c051c19c6298f150277c9dbdbe2bcd (diff)
Define the Base Template and fix Hugo warnings
* Define the Base Template (baseof.html) * Use relative URL link to style.css file * Move summary.html from partials to _default layouts * Fix Hugo warnings (needs Hugo 0.20 or newer) * Fix Paginator rule on main page. Fix #8 * Latest posts: show pages from mainSections only * Bump Hugo 0.19 -> 0.20 * Formatting
Diffstat (limited to 'layouts/_default/list.html')
-rw-r--r--layouts/_default/list.html16
1 files changed, 11 insertions, 5 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index bc7f4e6..68fb00c 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -1,10 +1,16 @@
-{{ partial "header.html" . }}
+{{ define "main" }}
<main>
- {{ $paginator := .Paginate (where .Data.Pages "Type" "post") }}
- {{ range $paginator.Pages }}
- {{ partial "summary.html" . }}
+ {{ if or .Title .Content }}
+ <div>
+ {{ with .Title }}<h1>{{ . }}</h1>{{ end }}
+ {{ with .Content }}<div>{{ . }}</div>{{ end }}
+ </div>
+ {{ end }}
+
+ {{ range .Paginator.Pages }}
+ {{ .Render "summary" }}
{{ end }}
{{ partial "pagination.html" . }}
</main>
{{ partial "sidebar.html" . }}
-{{ partial "footer.html" . }}
+{{ end }}