I have a param in the front matter in my post but I wanted to use html as I need them to be lists <li> but I’m getting an error.
Error while rendering “page” in “work/”: template: work/single.html:19:29: executing “work/single.html” at : wrong number of args for safeHTML: want 1 got 0
We need to see your site’s code, and specifically that single.html template, in order to replicate your error. Check out requesting help, and share a link.
@ramiroruiz I cannot reproduce this error locally. My guess would be that you’re missing goals: on at least one of your markdown files that’s rendering according to the single.html template.
Please try checking for the existence of the param first and let me know if you’re having the same issue. Modify the code you shared here.
IMHO, this is also more tasteful in that the entire unordered list only renders if the param is available, thereby eliminating the chances of creating an empty <ul> for no reason. HTH.
@ramiroruiz To add to what @rdwatters said, you don’t see this failure when running hugo server because you probably have the disableFastRender variable at its default value of false. So it renders only few last modified/related files and not all the .md files you might have. You should be able to see the same error in hugo server too is you have disableFastRender = true in your config.toml.
FWIW I always have that setting in my config.toml to avoid surprises like these, as I don’t have sites large enough to benefit from the fast/partial rendering feature.