Skip to content

Commit

Permalink
Update nav.html (#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 Jul 10, 2024
1 parent acc1dd2 commit 89594f9
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 89594f9

Please sign in to comment.