Replies: 1 comment
-
Need to solve same case, today. Thats how i did. <header class="navbar navbar-expand-md navbar-light doks-navbar">
<nav class="container-{{ if .Site.Params.options.fullWidth }}fluid{{ else }}xxl{{ end }} flex-wrap flex-md-nowrap" aria-label="Main navigation">
<a class="navbar-brand p-0 me-auto" href="{{ "/" | relLangURL }}" aria-label="{{ .Site.Params.Title }}">
{{ .Site.Params.Title }}
</a> to new one: <header class="navbar navbar-expand-md navbar-light doks-navbar">
<nav class="container-{{ if .Site.Params.options.fullWidth }}fluid{{ else }}xxl{{ end }} flex-wrap flex-md-nowrap" aria-label="Main navigation">
<a class="navbar-brand p-0 me-auto" href="{{ "/" | relLangURL }}" aria-label="{{ .Site.Params.Title }}">
{{ if .Site.Params.siteLogo }}
<img class="logo-light" src="{{ .Site.Params.siteLogoLight }}" width="{{ .Site.Params.siteLogoWidth }}">
<img class="logo-dark d-none" src="{{ .Site.Params.siteLogoDark }}" width="{{ .Site.Params.siteLogoWidth }}">
{{ else }}
{{ .Site.Params.Title }}
{{ end }}
</a> Add some new params to config_default\params.toml: ...
# Set site log or disable
siteLogo = true
siteLogoLight = "/images/logo-lighttheme.png"
siteLogoDark = "/images/logo-darktheme.png"
siteLogoWidth = "60px" # width adjustment or set 'auto'
... Place logo files in static\images folder. There must be two versions, for dark mode and light. Or you can use same url for both. Hope help someone if in searching. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is it possible to add a logo to the top left corner?
Beta Was this translation helpful? Give feedback.
All reactions