From 16cdb23fd3c28d2dfa2f89b424f9709050269003 Mon Sep 17 00:00:00 2001 From: Ville Lindholm Date: Thu, 26 Dec 2024 12:18:01 +0200 Subject: [PATCH] Remove code duplication for landing page --- content/_index.md | 4 +++- layouts/index.html | 16 +--------------- layouts/shortcodes/rawhtml.html | 1 + 3 files changed, 5 insertions(+), 16 deletions(-) create mode 100644 layouts/shortcodes/rawhtml.html diff --git a/content/_index.md b/content/_index.md index 14cdb95..d94a16c 100644 --- a/content/_index.md +++ b/content/_index.md @@ -2,6 +2,7 @@ title: "Home" --- +{{< rawhtml >}}
Picture of Ville Lindholm
@@ -14,4 +15,5 @@ title: "Home"
- \ No newline at end of file + +{{< /rawhtml >}} \ No newline at end of file diff --git a/layouts/index.html b/layouts/index.html index 0aad804..f752ee3 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,17 +1,3 @@ {{ define "main" }} -
- Picture of Ville Lindholm -
-

Ville Lindholm

-

Full-stack Software engineer

-

Helsinki, Finland

-
-
- - - -
-
+{{ .Content }} {{ end }} \ No newline at end of file diff --git a/layouts/shortcodes/rawhtml.html b/layouts/shortcodes/rawhtml.html new file mode 100644 index 0000000..3cb9351 --- /dev/null +++ b/layouts/shortcodes/rawhtml.html @@ -0,0 +1 @@ +{{ .Inner | safeHTML }} \ No newline at end of file