Add param logoPath.

This commit is contained in:
Fredrik Jonsson 2021-11-05 09:30:59 +01:00
commit fec3d75d9c
2 changed files with 2 additions and 1 deletions

View file

@ -169,6 +169,7 @@ params:
jquery: true # Add jQuery
languageDir: "" # Set ltr or rtl, defaults to ltr.
logo: false # Turn off the logo.
logoPath: # Relative path to site logo, defaults to "images/logo.png", no leading slash.
mainSections: # The sections you want to have listed on the front page.
- "section1" # Default to the section with most content if not set.
- "section2" # Set to empty if no section should be listed.

View file

@ -15,7 +15,7 @@
<body class="{{ if .IsPage }}single-page{{ else }}list-page{{ end }}{{ if .IsHome }} front{{ end }}">
<div class="page layout__page{{ if $.Param "sidebar" | default true }} layout__sidebar-second{{ end }}">
<header class="header layout__header">
{{ if $.Param "logo" | default true }}<a href="{{ "/" | relLangURL }}" title="Home" rel="home" class="header__logo"><img src="{{ "/images/logo.png" | relURL }}" alt="Home" class="header__logo-image"></a>{{ end }}
{{ if $.Param "logo" | default true }}<a href="{{ "/" | relLangURL }}" title="Home" rel="home" class="header__logo"><img src="{{ with $.Param "logopath" }}{{ . | relURL }}{{ else }}{{ "/images/logo.png" | relURL }}{{ end }}" alt="Home" class="header__logo-image"></a>{{ end }}
<h1 class="header__site-name">
<a href="{{ "/" | relLangURL }}" title="Home" class="header__site-link" rel="home"><span>{{ .Site.Title }}</span></a>
</h1>