Comments (13)
It can occasionally happen in prod build as well. I build 4 times and got 1 time error
from doit.
Can you share your params.toml or hugo.toml configurations? Specifically have you configured anything about params.image
?
from doit.
image:
# 缓存图片链接到本地
cacheRemote : true
# 图片缩放和优化
optimise : true
I copied the configuration from master
from doit.
Can you provide a minimal reproduction? I cannot reproduce this issue on the exampleSite.
The error message is just saying that params.image
has type string
instead of map
, which indicates that it might be a configuration error. I suspect somewhere in the config there is an image = "some/image.png"
entry which is causing conflicts.
from doit.
I added image : ""
into the seo.en.yaml, will it cause the conflict? as this is not 100% reproducible, so I need some time to make minimal project.
from doit.
I tried to log the data and debug the template, I found one interesting thing
Status | ScreenShot | Type |
---|---|---|
Success | Map | |
Fail | empty string | |
Fail | Map but recognize as String |
So it seems the data is not recoginze instead of configuration problem
btw, I'm using YAML to config hugo
from doit.
How do you trigger the third case? What's the difference between the first case and the third case?
This might be an issue with Hugo...
from doit.
I try to rename image in image.html
from
{{- $cacheRemote := .CacheRemote | default site.Params.image.cacheRemote | default false -}}
{{- $optimise := .Optimise | default site.Params.image.optimise | default false -}}
to
{{- $cacheRemote := .CacheRemote | default site.Params.imageX.cacheRemote | default false -}}
{{- $optimise := .Optimise | default site.Params.imageX.optimise | default false -}}
and config the imageX in the params.yaml, then no issue found, so it still could be conflict. however, I searched the config in my site, only this image was configured. I have no idea to continue. could it conflict image with hugo?
from doit.
@HEIGE-PCloud nothing difference when trigger these 3 cases, just run and screenshot, all the configurations are the same. from my POV, it seems the configuration was changed in runtime in 3rd case, even though it read as map before, but the configuration was changed to String when process the image.html
from doit.
I think I figured out the RC, so I added below to my site as seo.en.yaml
and seo.zh-cn.yaml
# Site SEO config
# 网站 SEO 配置
[seo]
# image URL
# 图片 URL
image = "/images/Apple-Devices-Preview.png"
# thumbnail URL
# 缩略图 URL
thumbnailUrl = "/images/screenshot.png"
# Google 搜索结果中网站备用名字
# alternate site name in Google search result
# https://developers.google.com/search/docs/appearance/site-names#alternative
# alternateName = ["Hugo DoIt"]
so whenever, I attach image
field then it will be high possibility fail. If I remove the field, then nothing went wrong. But I have no idea, why the seo
can override the image
in params, it could be hugo issue
from doit.
The SEO config is under the params namespace https://github.com/search?q=repo%3AHEIGE-PCloud%2FDoIt%20params.seo&type=code
So it should be placed in params.yaml
. Inside params.yaml
, you should have both
image:
cacheRemote: true
optimise: true
seo:
image: /images/Apple-Devices-Preview.png
thumbnailUrl: /images/screenshot.png
DoIt/exampleSite/config/_default/params.toml
Line 543 in 98ba1e5
I am not sure whether this is the RC though.
from doit.
I don't think Hugo actually supports arbitrary top level config keys... Not sure what it does when it sees one.
from doit.
since the issue gone after the change, I think this should be RC. thx for support and sorry to raise false alarm
from doit.
Related Issues (20)
- Refactor assets management
- [Experimental] Use Speculation Rules API to replace instant.page
- [Experimental] View Transition Support HOT 1
- Q: Customize dark theme CSS HOT 2
- [BUG] Header logo is cut on the sides HOT 6
- [FEATURE] Skill and experience timeline widget add HOT 2
- [BUG] Regular Markdown images are incorrectly recognized as figures HOT 8
- [BUG] 文件名、目录名或卷标语法不正确。 HOT 4
- [BUG] img height error HOT 1
- [FEATURE] Shortcode for github code HOT 4
- [BUG] Tags with '#' are not displayed correctly HOT 4
- Refactor tags / categories / series rendering HOT 1
- [BUG] deploy with githubAction failed
- [BUG] Series中包含空格,post-meta里面会无法渲染出文字 HOT 2
- [BUG] ToC没有生成目录的原因请教
- [FEATURE] Support Server Side Maths Render
- [FEATURE] Support Blockquotes Render Hooks
- algolia 国内的站搜索有问题,但是 github.io 的站是好的。请问是还需要配置什么吗 HOT 1
- 如何让某个单独的页面 page.header.number **不开启**标题自动编号? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from doit.