Make header title a link to base URL (home page)

This is a common pattern found in many sites. I've also added styling
to remove the underline.
This commit is contained in:
Sangeeth Sudheer 2024-10-28 14:10:57 +05:30
parent 56f4a62fc5
commit a405e509ec
2 changed files with 8 additions and 2 deletions

View file

@ -141,6 +141,10 @@ hr {
margin-top: 0;
}
.header-title a {
text-decoration: none;
}
/* Footer */
footer {
@ -523,4 +527,4 @@ blockquote {
blockquote p {
margin-left: 1rem;
margin-right: 1rem;
}
}

View file

@ -4,7 +4,9 @@
{{ if or (not (.Param "hideHeader")) .IsHome }}
<h1 class="header-title">{{ site.Title }}</h1>
<h1 class="header-title">
<a href="{{ site.BaseURL }}">{{ site.Title }}</a>
</h1>
<div class="flex">
{{ $currentPage := . }}