Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ojroques/hugo-researcher.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Roques <oroques@cisco.com>2021-01-24 00:10:27 +0300
committerOlivier Roques <oroques@cisco.com>2021-01-24 00:10:27 +0300
commitb0edab5611fceeef86d5c592ca51530bf3286ec6 (patch)
tree2b71ea7d8f6bfa26e6206b13a5e8a8f629f15783
parent093dcde1cc50b9ae09608ab199bff66cb8aaae06 (diff)
Add support for a header logo
Closes #12
-rw-r--r--exampleSite/config.toml1
-rw-r--r--layouts/partials/header.html7
2 files changed, 7 insertions, 1 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 7dd0f4a..3592e04 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -10,6 +10,7 @@ googleAnalytics = "" # add your tracking id
author = "Olivier Roques"
description = "A simple monospaced resume theme for Hugo."
favicon = "favicon.ico" # path to a .ico to use as favicon
+ logo = "" # url or path to a logo to put in the header
[params.footer]
text = "By Olivier Roques"
url = "https://github.com/ojroques/hugo-researcher"
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index e9debdf..37f5259 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -1,6 +1,11 @@
<div class="container mt-5">
<nav class="navbar navbar-expand-sm flex-column flex-sm-row text-nowrap p-0">
- <a class="navbar-brand mx-0 mr-sm-auto" href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
+ <a class="navbar-brand mx-0 mr-sm-auto" href="{{ .Site.BaseURL }}">
+ {{ with .Site.Params.logo }}
+ <img src="{{ . | absURL }}" alt="logo">
+ {{ end }}
+ {{ .Site.Title }}
+ </a>
<div class="navbar-nav flex-row flex-wrap justify-content-center">
{{ with .Site.Menus.main }}
{{ $navbar_len := len . }}