summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReorx <novoreorx@gmail.com>2022-05-19 18:57:42 +0800
committerReorx <novoreorx@gmail.com>2022-05-19 18:57:42 +0800
commit84ac59ce9d37bcce0c7bf1165182b59e8aff57b0 (patch)
treef5d94e466663e0f0d63b4202479da84af3e5e62b
parent6159f68a27198e182ee9ffe095425a8bd2f41705 (diff)
remove home page all language support that may cause trouble
it can cause the search page to have a redundant result for each page
-rw-r--r--layouts/_default/list.html8
1 files changed, 1 insertions, 7 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index 9bd0e96..2f83d14 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -28,13 +28,7 @@
{{- $pages := .Pages }}
{{- if .IsHome }}
- {{/* first language is the main language, get all pages */}}
- {{- if (eq site.Language (index site.Languages 0)) }}
- {{- $pages = where site.AllPages "Kind" "page" }}
- {{- else }}
- {{- $pages = site.RegularPages }}
- {{- end }}
- {{- $pages = where $pages "Type" "in" site.Params.mainSections }}
+ {{- $pages = where site.RegularPages "Type" "in" site.Params.mainSections }}
{{- end }}
{{/* related issue: https://github.com/gohugoio/hugo/issues/9003 */}}