feat: enable profile display on home page and add option to show content only on the first page

This commit is contained in:
Cell
2025-12-22 11:40:10 +08:00
parent c76cb4c8be
commit 4cd9a6940e
3 changed files with 4 additions and 2 deletions
+2
View File
@@ -659,6 +659,8 @@ orderby = "name" # Order of tags, optional values: ["name", "count"]
# Home page profile
[params.home.profile]
enable = false
# FixIt 0.4.0 | NEW Whether to show profile and content only in the first home page
onlyFirstPage = false
# Gravatar Email for preferred avatar in home page
gravatarEmail = ""
# URL of avatar shown in home page, default is author's avatar
+1 -1
View File
@@ -1,4 +1,4 @@
{{- hugo.Store.Set "version" "v0.4.0-alpha.3-20251222033541-3c7babb5" -}}
{{- hugo.Store.Set "version" "v0.4.0-alpha.3-20251222034819-3fa866fa" -}}
{{- .Store.Set "this" dict -}}
{{- partial "init/detection-env.html" . -}}
+1 -1
View File
@@ -28,7 +28,7 @@
<div class="page home{{ if ne $posts.enable false }} posts{{ end }}">
{{- /* Only show profile and content on first page */ -}}
{{- if eq $.Paginator.PageNumber 1 -}}
{{- if (not $profile.onlyFirstPage) | or (eq $.Paginator.PageNumber 1) -}}
{{- /* Profile */ -}}
{{- if ne $profile.enable false -}}
{{- partial "home/profile.html" . -}}