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

RSS Template Errors When Table Present in Markdown #13351

Open
gwagner opened this issue Feb 6, 2025 · 5 comments
Open

RSS Template Errors When Table Present in Markdown #13351

gwagner opened this issue Feb 6, 2025 · 5 comments

Comments

@gwagner
Copy link

gwagner commented Feb 6, 2025

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

$ hugo version
hugo v0.143.1+extended+withdeploy linux/amd64 BuildDate=unknown

Does this issue reproduce with the latest release?

Yes


When I try to build my hugo project, if there is a valid table in a markdown file, the default rss.xml template pukes at this line.

The error i receive is:

Error: error building site: render: failed to render pages: render of "<PATH>/content/author/_index.md" failed: template: _internal/_default/rss.xml:55:22: executing "_internal/_default/rss.xml" at <.Summary>: error calling Summary: table hook renderer not found

When I add the template locally to /themes//layouts/_default/rss.xml and comment out line 55 (linked above), the build works perfectly fine.

I am happy to provide any relevant config information, but I do not have anything special in the config. I am using the default Goldmark Markdown Renderer.

markup:
  goldmark:
    extensions:
      typographer: false
    renderer:
      unsafe: true
@gwagner
Copy link
Author

gwagner commented Feb 6, 2025

A bit more context, when I comment out the tables in my markdown, the default template works.

When modifying the template locally, it doesn't matter if I try to use .Content instead of .Summary or if I try to truncate either of them before the table. Each permutation still leads to the same error.

When following this: https://gohugo.io/render-hooks/tables/
I added file <PATH>/themes/<THEME>/layouts/_default/_markup/render-table.html using the example provided in the URL above. There is no change, and the error is still the same.

The only temp fix is to comment or remove line 55.

@jmooring
Copy link
Member

jmooring commented Feb 6, 2025

if there is a table in a valid table in a markdown file

I'm not sure what that means. It would be helpful if you could provide a reproducible example (e.g., a repository).

@gwagner
Copy link
Author

gwagner commented Feb 6, 2025

@jmooring it is in a private repo, I will work up an example file with the failing condition in it and I will post it here.

I also corrected the typo in the original bug report above.

@jmooring
Copy link
Member

jmooring commented Feb 6, 2025

I am unable to reproduce the problem as described:

git clone --single-branch -b hugo-github-issue-13351 https://github.com/jmooring/hugo-testing hugo-github-issue-13351
cd hugo-github-issue-13351
hugo server

So there's obviously something different about your site.

@jmooring
Copy link
Member

jmooring commented Feb 9, 2025

@gwagner Are you able to provide a reproducible example?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants