From a25e6463bdc9900e5f999d276a0e5d92ee1f8d9a Mon Sep 17 00:00:00 2001 From: Hendra Manudinata <87532060+manudinath@users.noreply.github.com> Date: Fri, 23 Jul 2021 16:56:52 +0800 Subject: [PATCH] feat(sidebar): add option to disable avatar in left sidebar (#268) * Allow to disable logo image in left sidebar * Enable sidebar avatar by default for backward compatibility Co-authored-by: Jimmy Cai --- exampleSite/config.yaml | 1 + layouts/partials/sidebar/left.html | 2 ++ 2 files changed, 3 insertions(+) diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index 578c574..de5d951 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -37,6 +37,7 @@ params: emoji: 🍥 subtitle: Lorem ipsum dolor sit amet, consectetur adipiscing elit. avatar: + enabled: true local: true src: img/avatar.png diff --git a/layouts/partials/sidebar/left.html b/layouts/partials/sidebar/left.html index c7158bb..af483e3 100644 --- a/layouts/partials/sidebar/left.html +++ b/layouts/partials/sidebar/left.html @@ -7,6 +7,7 @@
{{ with .Site.Params.sidebar.avatar }} + {{ if (default true .enabled) }}
{{ if not .local }} @@ -26,6 +27,7 @@ {{ . }} {{ end }}
+ {{ end }} {{ end }}

{{ .Site.Title }}

{{ .Site.Params.sidebar.subtitle }}