From: Daniel Jr Date: Sat, 28 Sep 2024 20:25:52 +0000 (-0300) Subject: add favicon X-Git-Url: https://git.danielmrcl.dev/?a=commitdiff_plain;h=74293c5605fb239add371db937326b95fbdbb387;p=danielmrcl.dev.git add favicon Signed-off-by: Daniel Jr --- diff --git a/hugo.toml b/hugo.toml index dbf463b..a8b0d06 100644 --- a/hugo.toml +++ b/hugo.toml @@ -35,6 +35,7 @@ weight = 2 rss = false tocInline = true logo = "image.jpg" + favicon = "favicon.ico" description = "Since 2021, I've been developing Java 8+ applications using Spring and PostgreSQL in a microservices architecture for critical, efficient and scalable systems. With a focus on code quality, architecture and scalability, I have strong foundation of programming, design and architecture. I am passionate about programming and constantly learn new technologies and paradigms." mainSection = "posts" postsOnHomePage = 5 diff --git a/static/favicon.ico b/static/favicon.ico new file mode 100644 index 0000000..1e3783f Binary files /dev/null and b/static/favicon.ico differ diff --git a/themes/cactus/layouts/partials/favicon.html b/themes/cactus/layouts/partials/favicon.html index 5b4c0b3..eb3745f 100644 --- a/themes/cactus/layouts/partials/favicon.html +++ b/themes/cactus/layouts/partials/favicon.html @@ -1,2 +1,8 @@ - - +{{ if (isset .Site.Params "favicon") }} + {{ .Scratch.Set "favicon_path" .Site.Params.favicon }} +{{ else }} + {{ .Scratch.Set "favicon_path" "images/favicon.ico" }} +{{ end }} + +{{ $favicon_path := .Scratch.Get "favicon_path" }} +