diff options
author | Lars Kruse <devel@sumpfralle.de> | 2020-09-13 19:22:54 +0300 |
---|---|---|
committer | Lars Kruse <devel@sumpfralle.de> | 2020-09-13 21:33:14 +0300 |
commit | 9bf32e1c746404014bd23cd6521a2a5a2133216e (patch) | |
tree | 13d34ab3ab8ebb818c66da4618a8573ef8b35615 | |
parent | 94982f7998875e98de9d00482a35dcbe6a5df5eb (diff) |
Add support for optional site logo
The logo will be prepended to the site title in the navigation bar.
-rw-r--r-- | assets/css/ace.scss | 3 | ||||
-rw-r--r-- | exampleSite/content/configuration/_index.md | 10 | ||||
-rw-r--r-- | layouts/partials/header.html | 3 |
3 files changed, 16 insertions, 0 deletions
diff --git a/assets/css/ace.scss b/assets/css/ace.scss index 1d34591..7ad4ae9 100644 --- a/assets/css/ace.scss +++ b/assets/css/ace.scss @@ -45,6 +45,9 @@ $dark: #343a40; padding:15px; } +.navbar-brand img { + height: 3rem; +} /* Side navigation menus */ .docs-sidenav span.badge.badge-primary, .docs-toc span.badge.badge-primary{ diff --git a/exampleSite/content/configuration/_index.md b/exampleSite/content/configuration/_index.md index dd05a47..2425625 100644 --- a/exampleSite/content/configuration/_index.md +++ b/exampleSite/content/configuration/_index.md @@ -24,6 +24,16 @@ toc = false in the <code>config.toml</code> or the <code>frontmatter</code> (a page's markdown file) for a page-wide or page-specific disabling of the ToC respectively. + +## Logo + +An optional site logo can be specified: + +{{< code >}} +logo = /logo.svg +{{< /code >}} + + ## Google Analytics Enable Google Analytics by adding your GA tracking ID to the <code>config.toml</code> file, at: diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 79224ad..1aa7077 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -2,6 +2,9 @@ <div class="container"> <div> <a class="navbar-brand" href="{{ .Site.BaseURL | relLangURL }}"> + {{ with .Site.Params.site_logo }} + <img src="{{ . }}" height="3rem" /> + {{ end }} {{ .Site.Title }} </a> </div> |