From 49b0fbd98d96fbb74b93cab7bb9c485e3e25545c Mon Sep 17 00:00:00 2001
From: Ramiro Morales
Date: Tue, 28 May 2024 19:36:27 +0200
Subject: [PATCH 1/2] Center post body horizontally if there is no toc nor
related blocks
---
layouts/_default/single.html | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 036513232..17245a030 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -4,8 +4,10 @@
{{ end }}
{{ define "main" }}
+ {{- $related_content := .RegularPages.Related . -}}
+ {{- $needs_aside := or .Params.toc $related_content -}}
{{ $section := .Site.GetPage "section" .Section }}
-
+
{{ end }}
+ {{- end -}}
{{/* Hugo uses Go's date formatting is set by example. Here are two formats */}}
{{ if not .Date.IsZero }}