Skip to content

Commit 9d1d1db

Browse files
Merge pull request #28 from m-hofmann/main
Make home_image optional
2 parents e2dd05e + 1a1129c commit 9d1d1db

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ copyright = "© Copyright Year, Your Name"
9191
description = "Your meta description" # Your meta description of the site
9292
header_title = "Your Name" # Your header title
9393
header_subtitle = "Your Creative Subtitle" # Your header subtitle
94-
home_image = "/images/avatar.png" # Path to header image starting from the static directory
94+
home_image = "/images/avatar.png" # Path to header image starting from the static directory (optional)
9595
recent_posts = 5 # Max amount of recent posts to show
9696
mainSections = ["posts", "post", "blog"] # Main sections to include in recent posts
9797
[params.style] # CSS style overrides

layouts/partials/header.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<header class="container mt-sm-5 mt-4 mb-4 mt-xs-1">
22
<div class="row">
3+
{{ if isset .Site.Params "home_image" }}
34
<div class="col-sm-4 col-12 text-sm-right text-center pt-sm-4">
45
<a href="/" class="text-decoration-none">
56
<img id="home-image" class="rounded-circle"
@@ -16,6 +17,9 @@
1617
</a>
1718
</div>
1819
<div class="col-sm-8 col-12 text-sm-left text-center">
20+
{{ else }}
21+
<div class="col-12 text-center">
22+
{{ end }}
1923
<h2 class="m-0 mb-2 mt-4">
2024
<a href="/" class="text-decoration-none">
2125
{{ if isset .Site.Params "header_title" }}

0 commit comments

Comments
 (0)