summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2025-08-16 19:46:06 +0200
committerMartin Fischer <martin@push-f.com>2025-08-16 20:52:57 +0200
commitbd063c30e3a0160efe187d4a766e105157ba12fd (patch)
tree6e57d7593b51e85d136bc667dca86e632f848ad7
parent3cada41922abb83b5a5541e4b5efd3fc1659c483 (diff)
change: make home template embed content/home.md
-rw-r--r--README.md3
-rw-r--r--layouts/_default/home.html16
-rw-r--r--wiki/features/homepage.md14
-rw-r--r--wiki/setup.md7
4 files changed, 5 insertions, 35 deletions
diff --git a/README.md b/README.md
index bdaf2fa..f068fba 100644
--- a/README.md
+++ b/README.md
@@ -4,6 +4,9 @@ Tastefejl is a fork of the [Typo] Hugo theme, with the following changes:
* Replaced the JavaScript theme switching code with a CSS media query.
+* The home page embeds `content/home.md` rather than `homeIntroContent` from your `hugo.toml`
+ because Markdown text should be in `.md` files.
+
* Removed [Simple Icons] because I don't want to plaster brands on my website and at one point a 50MB .html file was committed
(I filtered the git history to reduce the size of the repository.)
diff --git a/layouts/_default/home.html b/layouts/_default/home.html
index e58a520..e7c9058 100644
--- a/layouts/_default/home.html
+++ b/layouts/_default/home.html
@@ -2,21 +2,7 @@
{{ .Content }}
-{{/* Intro summary section */}}
-
-{{ if or .Site.Params.homeIntroTitle .Site.Params.homeIntroContent }}
-<div class="intro">
- {{ with .Site.Params.homeIntroTitle }}
- <h1>{{ . }}</h1>
- {{ end }}
-
- {{ with .Site.Params.homeIntroContent }}
- <p>{{ . | markdownify }}</p>
- {{ end }}
-</div>
-{{ end }}
-
-{{/* Collection Section */}}
+{{ readFile "content/home.md" | markdownify }}
{{ if .Site.Params.homeCollection }}
diff --git a/wiki/features/homepage.md b/wiki/features/homepage.md
index db4cb37..7f81274 100644
--- a/wiki/features/homepage.md
+++ b/wiki/features/homepage.md
@@ -14,19 +14,7 @@ The homepage offers minimal customization options, you can specify an intro, and
## Intro Section
-By setting those two parameters in your `hugo.toml` config you can control the text to display after the header on the homepage. Note that the body is interpreted as markdown.
-
-```toml
-[params]
-homeIntroTitle = 'Hi!'
-
-homeIntroContent = """
-I am an Italian Software Engineer with a strong foundation in computer science and a passion for solving complex problems.
-I am interested in a range of topics, including algorithms, distributed systems, databases, and information retrieval.
-"""
-```
-
-Note that you can omit one of the two if you want.
+Text you write in `content/home.md` will be embedded after the header on the homepage.
## Display a Collection
diff --git a/wiki/setup.md b/wiki/setup.md
index 16e8dd5..d0752f4 100644
--- a/wiki/setup.md
+++ b/wiki/setup.md
@@ -86,13 +86,6 @@ theme = 'auto'
colorPalette = 'default'
hideHeader = false
-# Intro on main page, content is markdown
-homeIntroTitle = 'Hi!'
-homeIntroContent = """
-I am an Italian Software Engineer with a strong foundation in computer science and a passion for solving complex problems.
-I am interested in a range of topics, including algorithms, distributed systems, databases, and information retrieval.
-"""
-
# Collection to display on home
homeCollectionTitle = 'Posts'
homeCollection = 'posts'