diff options
author | Dan Webb <dan.webb@damacus.io> | 2019-04-11 23:48:17 +0300 |
---|---|---|
committer | Dan Webb <dan.webb@damacus.io> | 2019-04-12 00:06:58 +0300 |
commit | 9c1b9ddf87f94ff4d96fd01339c0a89c6687fe6c (patch) | |
tree | c30d2b8d8eac224c0f4e5ed9113f6f537d7a3e7d | |
parent | fa24be58a7fb827e6a7bbf44b9d4d3a8c1ab20ae (diff) |
Make logo configurable
-rw-r--r-- | exampleSite/config.toml | 6 | ||||
-rw-r--r-- | layouts/partials/header.html | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 4c768a9..3098ab5 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -34,4 +34,8 @@ pygmentsUseClasses = true meta_og_description = "Hugo Whisper is a documentation theme built with Hugo." meta_twitter_card = "summary" meta_twitter_site = "@zerostaticio" - meta_twitter_creator = "@zerostaticio"
\ No newline at end of file + meta_twitter_creator = "@zerostaticio" + + [params.logo] + mobile = "/images/logo-mobile.svg" + standard = "/images/logo.svg" diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 160c766..d787090 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,12 +1,12 @@ <div class='header'> <div class="container"> <div class="logo"> - <a href="{{ .Site.BaseURL }}"><img alt="Logo" src="{{ "images/logo.svg" | absURL }}" /></a> + <a href="{{ .Site.BaseURL }}"><img alt="Logo" src="{{ .Site.Params.logo.standard }}" /></a> </div> <div class="logo-mobile"> - <a href="{{ .Site.BaseURL }}"><img alt="Logo" src="{{ "images/logo-mobile.svg" | absURL }}" /></a> + <a href="{{ .Site.BaseURL }}"><img alt="Logo" src="{{ .Site.Params.logo.mobile }}" /></a> </div> {{ partial "main-menu.html" . }} {{ partial "hamburger.html" . }} </div> -</div>
\ No newline at end of file +</div> |