From 3ac7e5cb22bdbce2bf114161e441201907d2b6e8 Mon Sep 17 00:00:00 2001 From: Rayjun0525 <92503959+Rayjun0525@users.noreply.github.com> Date: Fri, 5 May 2023 21:13:51 +0900 Subject: [PATCH 1/3] Fix See all posts error Add baseURL variable to link of see all posts button. --- layouts/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/index.html b/layouts/index.html index 4dcde2ac..b48612b8 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -17,7 +17,7 @@

Recent Posts

{{ end }} {{ if gt (len $posts) 5 }}

- See all posts + See all posts

{{ end }} From 452f899090b16bd9111864b7085d3700b512ec85 Mon Sep 17 00:00:00 2001 From: Rayjun0525 <92503959+Rayjun0525@users.noreply.github.com> Date: Fri, 5 May 2023 21:18:02 +0900 Subject: [PATCH 2/3] Fix See all posts button link Fix for 404 errors in see all posts if the default URL is not root. Add a baseURL variable to the link in the button. --- layouts/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/index.html b/layouts/index.html index b48612b8..af3997a8 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -17,7 +17,7 @@

Recent Posts

{{ end }} {{ if gt (len $posts) 5 }}

- See all posts + See all posts

{{ end }} From 00c748c353f704bb7ef0c3df0136c469a6cf6003 Mon Sep 17 00:00:00 2001 From: Rayjun0525 <92503959+Rayjun0525@users.noreply.github.com> Date: Sun, 7 May 2023 00:47:37 +0900 Subject: [PATCH 3/3] Retuching Code of See all posts button Apply by changing all publishing buttons to the code suggested by @kusyka911 --- layouts/index.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/layouts/index.html b/layouts/index.html index af3997a8..002a71e4 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -17,7 +17,9 @@

Recent Posts

{{ end }} {{ if gt (len $posts) 5 }}

- See all posts + {{ range $firstSection := (where .Site.Sections "Section" "in" (first 1 (.Site.Params.mainSections))) }} + See all posts + {{ end }}

{{ end }}