Skip to content

Commit

Permalink
Update nav.html (halogenica#493)
Browse files Browse the repository at this point in the history
added logo manager for asset, if is assets, optimize the logo in Hugo pipelines
  • Loading branch information
compermisos authored and sunpech committed Aug 16, 2024
1 parent f7bfd14 commit 0be1d43
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions layouts/partials/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,12 @@
<div class="avatar-container">
<div class="avatar-img-border">
<a title="{{ .Site.Title }}" href="{{ "" | absLangURL }}">
{{- $image := resources.Get ( $.Site.Params.logo) -}}
{{ if $image }}
<img class="avatar-img" src="{{ ($image.Fit "300x300 webp q100").Permalink }}" alt="{{ .Site.Title }}" />
{{else}}
<img class="avatar-img" src="{{ .Site.Params.logo | absURL }}" alt="{{ .Site.Title }}" />
{{end}}
</a>
</div>
</div>
Expand Down

0 comments on commit 0be1d43

Please sign in to comment.