Fix the list template and the config

This commit is contained in:
foo-dogsquared 2019-08-26 11:54:43 +08:00
parent c5155fde00
commit 989397db23
2 changed files with 5 additions and 7 deletions

View File

@ -30,7 +30,7 @@ disqusShortname = "foodogsquared"
[params.blog.contact.gitlab] [params.blog.contact.gitlab]
name = "GitLab" name = "GitLab"
link = "https://github.com/foo-dogsquared" link = "https://gitlab.com/foo-dogsquared/"
[params.blog.contact.twitter] [params.blog.contact.twitter]
name = "Twitter" name = "Twitter"

View File

@ -1,12 +1,10 @@
{{ define "main" }} {{ define "main" }}
{{ .Content }} {{ .Content }}
<div class="posts"> <div class="posts">
{{ $isntDefault := not (or (eq (trim $.Site.Params.contentTypeName " ") "posts") (eq (trim $.Site.Params.contentTypeName " ") "")) }} {{ $blogIcons := "blog-icons.svg" | absURL }}
{{ $contentTypeName := cond $isntDefault (string $.Site.Params.contentTypeName) "posts" }} {{ $isHomePage := eq .File.Dir "" }}
{{ $paginator := .Paginate (where .Data.Pages "Type" $contentTypeName) }} {{ $pages := cond ($isHomePage) (.Paginate .Site.Sections).Pages .Data.Pages }}
{{ range $pages }}
{{ $blogIcons := "blog-icons.svg" | absURL }}
{{ range .Data.Pages }}
<div class="post on-list"> <div class="post on-list">
<div class="post-header-wrapper"> <div class="post-header-wrapper">
<h1 class="post-title"> <h1 class="post-title">