From c8bf719e3d4a4c6ed1e70c5091f72e542ffc7a3d Mon Sep 17 00:00:00 2001 From: vimux Date: Tue, 30 Jul 2019 17:32:26 -0400 Subject: 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 --- layouts/index.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'layouts/index.html') diff --git a/layouts/index.html b/layouts/index.html index 56c41f3..ab01f67 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,10 +1,10 @@ -{{ partial "header.html" . }} +{{ define "main" }}
- {{ $paginator := .Paginate (where .Site.Pages "Type" "post") }} + {{ $paginator := .Paginate (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }} {{ range $paginator.Pages }} - {{ partial "summary.html" . }} + {{ .Render "summary" }} {{ end }} {{ partial "pagination.html" . }}
{{ partial "sidebar.html" . }} -{{ partial "footer.html" . }} +{{ end }} -- cgit v1.2.3