reorx/hugo-PaperModX

[BUG] Site logo does not show

istvnurbn opened this issue · 4 comments

Describe the bug
When the site logo is set like the below, it does not show when the site is rendered.

label:
  text: "site name"
  icon: "logo.svg"
  • Device/Os: macOS
  • Type:: Desktop
  • Browser and version: Firefox 105.0.1 & Chromium 106.0.5249.61
  • Hugo Version: v0.104.2+extended
  • Theme Version: master

Steps to reproduce the behavior:

  1. Set the label and icon as it is in the documentation.
  2. hugo server
  3. Logo does not show

Expected behavior:
The logo should show up left to the site's title.

Screenshots
N/A

Additional context
The header partial's logic is a bit different than the upstream PaperMod one.

Hello,

Try with :

params:
  logo:
     text: "coucou" (if empty = site.Title
     icon: "logo.png"
     iconHeight: 50 (default 30)

Hi,

After doing the suggested update I have the following error messages:

Start building sites …
hugo v0.104.3+extended darwin/arm64 BuildDate=unknown
WARN 2022/10/13 10:42:59 No image found for /posts/002/img_001.jpg from posts/002-kotty.md
ERROR 2022/10/13 10:42:59 render of "page" failed: "myhugoproject/themes/PaperModX/layouts/_default/baseof.html:17:8": execute of template failed: template: _default/single.html:17:8: executing "_default/single.html" at <partialCached "header.html" . .Page>: error calling partialCached: "myhugoproject/themes/PaperModX/layouts/partials/header.html:94:33": execute of template failed: template: partials/header.html:94:33: executing "partials/header.html" at <$img.Permalink>: nil pointer evaluating resource.Resource.Permalink
ERROR 2022/10/13 10:42:59 render of "taxonomy" failed: "myhugoproject/themes/PaperModX/layouts/_default/baseof.html:17:8": execute of template failed: template: _default/terms.html:17:8: executing "_default/terms.html" at <partialCached "header.html" . .Page>: error calling partialCached: "myhugoproject/themes/PaperModX/layouts/partials/header.html:94:33": execute of template failed: template: partials/header.html:94:33: executing "partials/header.html" at <$img.Permalink>: nil pointer evaluating resource.Resource.Permalink
ERROR 2022/10/13 10:42:59 render of "home" failed: "myhugoproject/themes/PaperModX/layouts/_default/baseof.html:17:8": execute of template failed: template: _default/list.html:17:8: executing "_default/list.html" at <partialCached "header.html" . .Page>: error calling partialCached: "myhugoproject/themes/PaperModX/layouts/partials/header.html:94:33": execute of template failed: template: partials/header.html:94:33: executing "partials/header.html" at <$img.Permalink>: nil pointer evaluating resource.Resource.Permalink
ERROR 2022/10/13 10:42:59 render of "page" failed: "myhugoproject/themes/PaperModX/layouts/_default/baseof.html:17:8": execute of template failed: template: _default/single.html:17:8: executing "_default/single.html" at <partialCached "header.html" . .Page>: error calling partialCached: "myhugoproject/themes/PaperModX/layouts/partials/header.html:94:33": execute of template failed: template: partials/header.html:94:33: executing "partials/header.html" at <$img.Permalink>: nil pointer evaluating resource.Resource.Permalink
Error: Error building site: failed to render pages: render of "page" failed: "myhugoproject/themes/PaperModX/layouts/_default/baseof.html:17:8": execute of template failed: template: _default/single.html:17:8: executing "_default/single.html" at <partialCached "header.html" . .Page>: error calling partialCached: "myhugoproject/themes/PaperModX/layouts/partials/header.html:94:33": execute of template failed: template: partials/header.html:94:33: executing "partials/header.html" at <$img.Permalink>: nil pointer evaluating resource.Resource.Permalink

Try with your logo image in assets directory.
If you configure :

params:
  logo:
     icon: "/img/logo.png"

you need to have /assets/img/logo.png file.

That did the trick, thanks!