gohugoio / hugo

The world’s fastest framework for building websites.
https://gohugo.io
Apache License 2.0
76.12k stars 7.54k forks source link

Issue with .Render from list templates/multiple output formats #4708

Closed bep closed 5 years ago

bep commented 6 years ago

This issue was discovered when writing some stress tests for #4706 -- probably not related, but it seems that it can render empty in given situations.

bep commented 6 years ago

This is actually as designed, but I will admit slightly confusing if you don't know better.

My test case was perhaps a bit confusing, but if you have a page with output JSON only (as an example) and run .Render on that page from a list template for the HTML output, it will not render anything.

I will keep this open to consider if we can do better.

regisphilibert commented 6 years ago

I wonder if this thread is related: https://discourse.gohugo.io/t/api-theme-component-need-help-taming-render-and-scratch/12566

github-actions[bot] commented 2 years ago

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.