HTML files in /content

I’m working on a bug … and finding some old code that I find … curious. But if I remove it, the behaviour for HTML files in /content changes. So I will ask this open question:

What is the current expectations for plain HTML files living in /content. That is both files with html, htm suffix etc. and md files with HTML only?

@bep I didn’t start with Hugo until .15, so I might not be the best person to ask, but I never add html/htm files to the content folder. Content is reserved for markdown files exclusively. In fact, whenever possible, I try to avoid muddying the markdown with inline HTML. Not sure if this is what you’re asking about, but I hope it helps.

@bep,
I’m assuming you’re trying to kill IsRenderable as discussed in #1601. Just based on the code I’ve seen, it looks like Hugo would detect HTML in a content file via shouldRender(). In pagerRenderer, if IsRenderable is false, it adds the HTML as a layout.

Does this feature not work? Why remove it? Maybe it needs to be renamed or we need some godoc comments on a few things (for sure!), but why remove it? The logic seems fairly straight forward to me.

Now as for my personal expectations, I don’t have a need for this feature. I didn’t even know it was possible until I started trying to track down that race condition.

Well, it is broken; so we either remove it or fix it. When even the guy who implemented it doesn’t remember why it is there and I had to read the code several times to remotely understand it, I question its value.

I don’t think it’s the cause of the race condition, so how is it broken?

Because it causes a race condition and then some other reasons. But please stick to the topic of this thread.