From 65dec45ece2188f814fff0d907db47fe0e6b9456 Mon Sep 17 00:00:00 2001
From: Patrick Kollitsch <83281+davidsneighbour@users.noreply.github.com>
Date: Sat, 17 Jan 2026 22:55:43 +0000
Subject: [PATCH] fix: add alignment option to home layout (#896)

---
 config/_default/params.toml |    3 +++
 layouts/home.html           |   11 ++++++++++-
 2 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/config/_default/params.toml b/config/_default/params.toml
index 566fa47..5b68e47 100644
--- a/config/_default/params.toml
+++ b/config/_default/params.toml
@@ -1,6 +1,9 @@
 [ananke]
 show_recent_posts = true # show recent posts on the homepage
 
+[ananke.home]
+content_alignment = "center" # options: left, center, right
+
 [ananke.social]
 icon_path = "ananke/socials/%s.svg"
 
diff --git a/layouts/home.html b/layouts/home.html
index e33f371..0c34a8d 100644
--- a/layouts/home.html
+++ b/layouts/home.html
@@ -1,5 +1,14 @@
 {{ define "main" }}
-  <article class="cf ph3 ph5-l pv3 pv4-l f4 tc-l center measure-wide lh-copy nested-links {{ $.Param "text_color" | compare.Default "mid-gray" }}">
+
+  {{- $config := site.Params.ananke.home -}}
+  {{- $text_alignment := "tc-l" -}}
+  {{- if eq $config.content_alignment "left" -}}
+    {{- $text_alignment = "tl-l" -}}
+  {{- else if eq $config.content_alignment "right" -}}
+    {{- $text_alignment = "tr-l" -}}
+  {{- end -}}
+
+  <article class="cf ph3 ph5-l pv3 pv4-l f4 {{ $text_alignment }} center measure-wide lh-copy nested-links {{ $.Param "text_color" | compare.Default "mid-gray" }}">
     {{ .Content }}
   </article>
 

--
Gitblit v1.10.0