Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

icon.png 更换无效,生成的网站维持原 icon #220

Open
fanghenshaometeor opened this issue Nov 23, 2022 · 3 comments
Open

icon.png 更换无效,生成的网站维持原 icon #220

fanghenshaometeor opened this issue Nov 23, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@fanghenshaometeor
Copy link

作者你好!

我将 themes/hugo-eureka/assets/images/ 下默认的 icon.png 替换成了另外一张同名但内容不同的 icon.png 之后,hugo 生成的网站仍然是之前的默认 icon 图标(也就是白底黑字的 W),无法更换图标。

我尝试在 themes/hugo-eureka/assets/images/ 下添加一个新的 icon.jpg 文件,同时在 config/_default/params.yaml 中将 icon: images/icon.png 修改成 icon: images/icon.jpg,此时再 hugo 生成网站则会报错

Start building sites … 
hugo v0.106.0-e08ce30fe4779e7d8a8395d7021314b915648cb4 windows/amd64 BuildDate=2022-11-17T18:33:40Z VendorInfo=gohugoio
ERROR 2022/11/23 16:20:26 render of "term" failed: "C:\Users\fangkun\AppData\Local\Temp\hugo_cache\modules\filecache\modules\pkg\mod\wangchucheng.com\hugo-eureka@v0.9.3\layouts\_default\baseof.html:7:6": execute of template failed: template: _default/list.html:7:6: executing "_default/list.html" at <partial "head" .>: error calling partial: "C:\Users\fangkun\AppData\Local\Temp\hugo_cache\modules\filecache\modules\pkg\mod\wangchucheng.com\hugo-eureka@v0.9.3\layouts\partials\head.html:172:58": execute of template failed: template: partials/head.html:172:58: executing "partials/head.html" at <partial "get-icon" (dict "icon" . "size" 32)>: error calling partial: execute of template failed: template: partials/head.html:178:24: executing "partials/get-icon" at <$icon.Fill>: nil pointer evaluating resource.Resource.Fill
ERROR 2022/11/23 16:20:26 render of "page" failed: "C:\Users\fangkun\AppData\Local\Temp\hugo_cache\modules\filecache\modules\pkg\mod\wangchucheng.com\hugo-eureka@v0.9.3\layouts\_default\baseof.html:7:6": execute of template failed: template: _default/single.html:7:6: executing "_default/single.html" at <partial "head" .>: error calling partial: "C:\Users\fangkun\AppData\Local\Temp\hugo_cache\modules\filecache\modules\pkg\mod\wangchucheng.com\hugo-eureka@v0.9.3\layouts\partials\head.html:172:58": execute of template failed: template: partials/head.html:172:58: executing "partials/head.html" at <partial "get-icon" (dict "icon" . "size" 32)>: error calling partial: execute of template failed: template: partials/head.html:178:24: executing "partials/get-icon" at <$icon.Fill>: nil pointer evaluating resource.Resource.Fill
ERROR 2022/11/23 16:20:26 render of "page" failed: "C:\Users\fangkun\AppData\Local\Temp\hugo_cache\modules\filecache\modules\pkg\mod\wangchucheng.com\hugo-eureka@v0.9.3\layouts\_default\baseof.html:7:6": execute of template failed: template: _default/single.html:7:6: executing "_default/single.html" at <partial "head" .>: error calling partial: "C:\Users\fangkun\AppData\Local\Temp\hugo_cache\modules\filecache\modules\pkg\mod\wangchucheng.com\hugo-eureka@v0.9.3\layouts\partials\head.html:172:58": execute of template failed: template: partials/head.html:172:58: executing "partials/head.html" at <partial "get-icon" (dict "icon" . "size" 32)>: error calling partial: execute of template failed: template: partials/head.html:178:24: executing "partials/get-icon" at <$icon.Fill>: nil pointer evaluating resource.Resource.Fill
ERROR 2022/11/23 16:20:26 render of "home" failed: "C:\Users\fangkun\AppData\Local\Temp\hugo_cache\modules\filecache\modules\pkg\mod\wangchucheng.com\hugo-eureka@v0.9.3\layouts\_default\baseof.html:7:6": execute of template failed: template: index.html:7:6: executing "index.html" at <partial "head" .>: error calling partial: "C:\Users\fangkun\AppData\Local\Temp\hugo_cache\modules\filecache\modules\pkg\mod\wangchucheng.com\hugo-eureka@v0.9.3\layouts\partials\head.html:172:58": execute of template failed: template: partials/head.html:172:58: executing "partials/head.html" at <partial "get-icon" (dict "icon" . "size" 32)>: error calling partial: execute of template failed: template: partials/head.html:178:24: executing "partials/get-icon" at <$icon.Fill>: nil pointer evaluating resource.Resource.Fill
Error: Error building site: failed to render pages: render of "taxonomy" failed: "C:\Users\fangkun\AppData\Local\Temp\hugo_cache\modules\filecache\modules\pkg\mod\wangchucheng.com\hugo-eureka@v0.9.3\layouts\_default\baseof.html:7:6": execute of template failed: template: authors/terms.html:7:6: executing "authors/terms.html" at <partial "head" .>: error calling partial: "C:\Users\fangkun\AppData\Local\Temp\hugo_cache\modules\filecache\modules\pkg\mod\wangchucheng.com\hugo-eureka@v0.9.3\layouts\partials\head.html:172:58": execute of template failed: template: partials/head.html:172:58: executing "partials/head.html" at <partial "get-icon" (dict "icon" . "size" 32)>: error calling partial: execute of template failed: template: partials/head.html:178:24: executing "partials/get-icon" at <$icon.Fill>: nil pointer evaluating resource.Resource.Fill
Built in 80 ms

期待回复!

@fanghenshaometeor fanghenshaometeor added the bug Something isn't working label Nov 23, 2022
@TimDorand
Copy link

TimDorand commented Mar 22, 2023

Hi, I had the same issue and found the fix. Update your params with this: https://github.com/wangchucheng/hugo-eureka-starters/blob/main/config/_default/params.yaml

@fanghenshaometeor
Copy link
Author

Hi, I had the same issue and found the fix. Update your params with this: https://github.com/wangchucheng/hugo-eureka-starters/blob/main/config/_default/params.yaml

Thanks for your kind reply. But i checked that my params.yaml is exactly the same as the file you share. it seems that it does not work. i still cannot change the icon.

@Li-Jinjie
Copy link

Hi, I changed the icon.png and presented successfully. Please see my forked repository https://github.com/Li-Jinjie/hugo-eureka. Maybe clean your cache?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants