From 5eecca6277dbf6ae74d8ae596542ba05d31b09fd Mon Sep 17 00:00:00 2001 From: rtk0c Date: Mon, 13 Oct 2025 11:09:38 -0700 Subject: Make theme respect _index.md PaperMod's default is so fucking atrocious... why, like why reinvent a homepage system in the config file??? --- themes/PaperMod/layouts/_default/list.html | 27 +++++++++---------------- themes/PaperMod/layouts/partials/home_info.html | 6 ++---- 2 files changed, 12 insertions(+), 21 deletions(-) (limited to 'themes') diff --git a/themes/PaperMod/layouts/_default/list.html b/themes/PaperMod/layouts/_default/list.html index 81aea6e..e0d0d40 100644 --- a/themes/PaperMod/layouts/_default/list.html +++ b/themes/PaperMod/layouts/_default/list.html @@ -30,14 +30,6 @@ {{- end }} -{{- if .Content }} -
- {{- if not (.Param "disableAnchoredHeadings") }} - {{- partial "anchored_headings.html" .Content -}} - {{- else }}{{ .Content }}{{ end }} -
-{{- end }} - {{- $pages := union .RegularPages .Sections }} {{- if .IsHome }} @@ -47,21 +39,22 @@ {{- $paginator := .Paginate $pages }} -{{- if and .IsHome site.Params.homeInfoParams (eq $paginator.PageNumber 1) }} +{{- if and .IsHome (eq $paginator.PageNumber 1) }} {{- partial "home_info.html" . }} {{- end }} +{{- if and (not .IsHome) .Content }} +
+ {{- if not (.Param "disableAnchoredHeadings") }} + {{- partial "anchored_headings.html" .Content -}} + {{- else }}{{ .Content }}{{ end }} +
+{{- end }} + {{- $term := .Data.Term }} {{- range $index, $page := $paginator.Pages }} -{{- $class := "post-entry" }} - -{{- $user_preferred := or site.Params.disableSpecial1stPost site.Params.homeInfoParams }} -{{- if (and $.IsHome (eq $paginator.PageNumber 1) (eq $index 0) (not $user_preferred)) }} -{{- $class = "first-entry" }} -{{- else if $term }} -{{- $class = "post-entry tag-entry" }} -{{- end }} +{{- $class := "post-entry tag-entry" }}
{{- $isHidden := (.Param "cover.hiddenInList") | default (.Param "cover.hidden") | default false }} diff --git a/themes/PaperMod/layouts/partials/home_info.html b/themes/PaperMod/layouts/partials/home_info.html index 199dfb7..3d96145 100644 --- a/themes/PaperMod/layouts/partials/home_info.html +++ b/themes/PaperMod/layouts/partials/home_info.html @@ -1,13 +1,11 @@ -{{- with site.Params.homeInfoParams }}

{{ .Title | markdownify }}

- {{ .Content | markdownify }} + {{ .Content }}
-{{- end -}} -- cgit v1.3.1