From 9d0027ac9d72d330a2361fbf3847e89c4f8002b5 Mon Sep 17 00:00:00 2001 From: Razon Yang Date: Mon, 23 Oct 2023 17:33:23 +0800 Subject: [PATCH] fix(archives): correct the year and month parsing when defaultContentLanguageInSubdir is false (#428) Closes #427 --- layouts/archives/list.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/archives/list.html b/layouts/archives/list.html index ec42a9b7..a6a6ec58 100644 --- a/layouts/archives/list.html +++ b/layouts/archives/list.html @@ -1,6 +1,6 @@ {{- define "title" }} {{- $pages := sort site.RegularPages "Date" "desc" }} - {{- $path := replace .RelPermalink site.Home.RelPermalink "" }} + {{- $path := replace .Permalink site.Home.Permalink "" }} {{- $paths := split $path "/" }} {{- $year := default "" (index $paths 1) }} {{- $month := default "" (index $paths 2) }}