Disable logo by default + add logo only if the user provide it
* Disable logo by default, allow to enable with params.logo.enable * Don't default logo into theme logo Signed-off-by: hossainemruz <hossainemruz@gmail.com> * add missing comma Signed-off-by: hossainemruz <hossainemruz@gmail.com> * Remove unnecessary changes Signed-off-by: hossainemruz <hossainemruz@gmail.com> Co-authored-by: Johannes Lippmann <johannes.lippmann@paessler.com> Co-authored-by: hossainemruz <hossainemruz@gmail.com>
This commit is contained in:
parent
88a0814025
commit
08a09d5c71
4 changed files with 75 additions and 52 deletions
|
@ -1,18 +1,3 @@
|
|||
{{/* default favicon */}}
|
||||
{{ $favicon := "/images/favicon.png" }}
|
||||
|
||||
{{/* if favicon is provided in the config, then use that */}}
|
||||
{{ if site.Params.logo.favicon }}
|
||||
{{ $favicon = site.Params.logo.favicon }}
|
||||
{{ end }}
|
||||
|
||||
{{/* resize the favicon. don't resize svg because it is not supported */}}
|
||||
{{ $favicon := resources.Get $favicon }}
|
||||
{{ if and $favicon (ne $favicon.MediaType.SubType "svg") }}
|
||||
{{ $favicon = $favicon.Resize "42x" }}
|
||||
{{ end }}
|
||||
{{ $favicon = $favicon.RelPermalink}}
|
||||
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
||||
|
@ -28,5 +13,17 @@
|
|||
<link href="https://fonts.googleapis.com/css2?family=Muli:wght@300;400;500;600" rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.min.css" />
|
||||
|
||||
<!--================= fav-icon =========================-->
|
||||
<link rel="icon" type="image/png" href="{{ $favicon }}" />
|
||||
<!--================= fab-icon =========================-->
|
||||
{{/* add favicon only if the site author has provided the the favicon */}}
|
||||
{{ if site.Params.logo.favicon }}
|
||||
{{ $favicon := site.Params.logo.favicon }}
|
||||
|
||||
{{/* resize the favicon. don't resize svg because it is not supported */}}
|
||||
{{ $favicon = resources.Get $favicon }}
|
||||
{{ if and $favicon (ne $favicon.MediaType.SubType "svg") }}
|
||||
{{ $favicon = $favicon.Resize "42x" }}
|
||||
{{ end }}
|
||||
{{ $favicon = $favicon.RelPermalink}}
|
||||
|
||||
<link rel="icon" type="image/png" href="{{ $favicon }}" />
|
||||
{{end}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue