From 989397db23ea0e8136d5f7d4c8ffa8583e715525 Mon Sep 17 00:00:00 2001 From: foo-dogsquared Date: Mon, 26 Aug 2019 11:54:43 +0800 Subject: [PATCH] Fix the list template and the config --- config.toml | 2 +- layouts/_default/list.html | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/config.toml b/config.toml index 6716df9..59e7ef2 100644 --- a/config.toml +++ b/config.toml @@ -30,7 +30,7 @@ disqusShortname = "foodogsquared" [params.blog.contact.gitlab] name = "GitLab" - link = "https://github.com/foo-dogsquared" + link = "https://gitlab.com/foo-dogsquared/" [params.blog.contact.twitter] name = "Twitter" diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 0df44ca..cd39b16 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,12 +1,10 @@ {{ define "main" }} {{ .Content }}
- {{ $isntDefault := not (or (eq (trim $.Site.Params.contentTypeName " ") "posts") (eq (trim $.Site.Params.contentTypeName " ") "")) }} - {{ $contentTypeName := cond $isntDefault (string $.Site.Params.contentTypeName) "posts" }} - {{ $paginator := .Paginate (where .Data.Pages "Type" $contentTypeName) }} - - {{ $blogIcons := "blog-icons.svg" | absURL }} - {{ range .Data.Pages }} + {{ $blogIcons := "blog-icons.svg" | absURL }} + {{ $isHomePage := eq .File.Dir "" }} + {{ $pages := cond ($isHomePage) (.Paginate .Site.Sections).Pages .Data.Pages }} + {{ range $pages }}