From d2c80668610a36c84c0679ff4313de56cc9de5ed Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Tue, 5 Feb 2019 13:52:17 +0100 Subject: [PATCH 1/2] Make "Older/Newer posts" texts configurable --- README.md | 2 ++ exampleSite/config.toml | 2 ++ layouts/partials/pagination.html | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 65663c4..47e0681 100644 --- a/README.md +++ b/README.md @@ -78,6 +78,8 @@ paginate = 5 writtenBy = "Written by" readMore = "Read more" readOtherPosts = "Read other posts" + newerPosts = "Newer posts" + olderPosts = "Older posts" [languages.en.params.logo] logoText = "hello friend" diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 7573f11..e315abf 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -20,6 +20,8 @@ paginate = 5 writtenBy = "Written by" readMore = "Read more" readOtherPosts = "Read other posts" + newerPosts = "Newer posts" + olderPosts = "Older posts" [languages.en.params.logo] logoText = "hello friend" diff --git a/layouts/partials/pagination.html b/layouts/partials/pagination.html index ec762d3..55c8b57 100644 --- a/layouts/partials/pagination.html +++ b/layouts/partials/pagination.html @@ -4,14 +4,14 @@ - Newer posts + {{ $.Site.Params.NewerPosts | default "Newer posts" }} {{ end }} {{ if .Paginator.HasNext }} - Older posts + {{ $.Site.Params.OlderPosts | default "Older posts" }} From a0d73cd693ea1d9c5354d9e43f19cbb1358c6b9d Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Tue, 5 Feb 2019 14:22:41 +0100 Subject: [PATCH 2/2] Allow empty config file --- layouts/_default/list.html | 4 ++-- layouts/_default/single.html | 4 ++-- layouts/partials/menu.html | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 2644fd1..c3d84ac 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -11,7 +11,7 @@ - {{ with .Params.Author }}{{ end }} + {{ with .Params.Author }}{{ end }} {{ if .Params.tags }} @@ -35,7 +35,7 @@ {{ end }} {{ end }} -
{{ $.Site.Params.ReadMore }} →
+
{{ $.Site.Params.ReadMore | default "Read more" }} →
{{ end }} {{ partial "pagination.html" . }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 15f2bad..6cd6f3d 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -7,7 +7,7 @@ {{ .Format "2006-01-02" }} {{ end }} - {{ with .Params.Author }}{{ end }} + {{ with .Params.Author }}{{ end }} {{ if .Params.tags }} @@ -28,7 +28,7 @@ {{ if or .NextInSection .PrevInSection }}