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

Consider _build vs build #11970

Closed
cmahnke opened this issue Feb 1, 2024 · 9 comments
Closed

Consider _build vs build #11970

cmahnke opened this issue Feb 1, 2024 · 9 comments
Assignees
Milestone

Comments

@cmahnke
Copy link

cmahnke commented Feb 1, 2024

What version of Hugo are you using (hugo version)?

$ hugo version
hugo v0.123.0-DEV-4174a7866b75c6ae10827cc77dbae0676af8e5eb+extended darwin/arm64 BuildDate=2024-02-01T18:42:55Z

Does this issue reproduce with the latest release?

Yes

Description

The site is building with Hugo 0.122.0, using the latest dev version it fails with this rather cryptic message:

ERROR Failed to create content converter: no content renderer found for markup ""

@bep: Cann you please add a hint, like template file and line to be able to narrow it down?

@jmooring
Copy link
Member

jmooring commented Feb 1, 2024

Are you passing "markup" as a key in the options map for .Page.RenderString? e.g.,

{{ $opts := dict "markup" "pandoc" }}
{{ $s | .RenderString $opts }} 

Or do you have a markup key in front matter, even an empty one?

@cmahnke
Copy link
Author

cmahnke commented Feb 1, 2024

No, neither of both. And just passing a empty string as markup in the font matter doesn't seem to trigger this.

But using disableKinds let me narrow it down to some template that is only called for term's - I'll check that.

@bep bep removed the NeedsTriage label Feb 1, 2024
@bep bep self-assigned this Feb 1, 2024
@bep bep added this to the v0.123.0 milestone Feb 1, 2024
bep added a commit to bep/hugo that referenced this issue Feb 1, 2024
bep added a commit that referenced this issue Feb 1, 2024
@bep
Copy link
Member

bep commented Feb 1, 2024

Cann you please add a hint, like template file and line to be able to narrow it down?

I added some page info ... But I fail to understand why the above happens.

@cmahnke
Copy link
Author

cmahnke commented Feb 1, 2024

@bep: Thanks, that was very helpful.
@jmooring: You were close I've got a front matter field build (since it's a site about architecture and uses the field to indicate when a building was topped out). Commenting this out fixes this message. But I can change that...

Thanks both!

@bep
Copy link
Member

bep commented Feb 1, 2024

build (since it's a site about architecture and uses the field to indicate when a building was topped out). Commenting this out fixes this message. But I can change that...

Hmm... I'm not sure I see the connection, but yea, I boldly renamed the _build to build not thinking that it would have any side-effects...

@bep bep changed the title Content converter error in 0.123.0-DEV Consider _build vs build Feb 1, 2024
@cmahnke
Copy link
Author

cmahnke commented Feb 1, 2024

Well, I'm just dumping metadata on a object described by a tag page in the frontmatter.
Just to avoid similar issues: This site also uses a type front matter field for tag pages to distinguish between buildings and architects.

BTW: I really like the error messages with a reference to the causing content file, this also has the benefit that they aren't eaten up.

@bep
Copy link
Member

bep commented Feb 2, 2024

@cmahnke OK. I will see if I can make that change less breaking. Note that we have created a separation between "Hugo page config" and "user defined params", so the recommended setup in 0.123.0 would be:

---
title: My page
params:
   myuserparam: foo
   build: some build setup that's not related to Hugo's build/_build
---

@cmahnke
Copy link
Author

cmahnke commented Feb 2, 2024

@bep Yes, I will do that. I guess the usual deprecation rules will apply for custom front matter fields as well.

Thanks!

@bep bep added the v0.123-DEV label Feb 2, 2024
bep added a commit to bep/hugo that referenced this issue Feb 3, 2024
* Throw a detailed error message in the mentioned case
* Also fixed a dropped error

Fixes gohugoio#11970
bep added a commit to bep/hugo that referenced this issue Feb 3, 2024
* Throw a detailed error message in the mentioned case
* Also fixed a dropped error

Fixes gohugoio#11970
@bep bep closed this as completed in a66480f Feb 3, 2024
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants