Disable automatic paragraphs

Hello everyone and thank you for your time.

I’m currently making pages, for example, about-us.
The about.md file has content, mainly shortcodes with custom html.
The problem is, when rendering the site, the final content has automatic <p> tags inserted. It breaks the html and design I’m trying to accomplish.

I’ve tried changing some BF settings to no avail.

Is there any way to tell HUGO to NOT add any automatic paragraph tags?

There is an open Github issue about this since 2015.

In that issue there are several workarounds.

But the one I use is:

{{ replace .Content "<p></p>" "" }}

And this is not really a Hugo issue. It is caused by Blackfriday (the Markdown engine).

I read the Github issue earlier but neither of the proposed workarounds worked.

Unfortunately, your offered workaround didn’t work either for my use case.

{{ replace .Content "<p></p>" "" }}

It’s not simply a matter of replacing p tags. The replace function, aside from not finding the real culprit p tags, also converts all the html output from the shortcodes to text, rendering incorrect output.

I’ve messed around with the blackfriday settings which are explained in the Hugo Docs, but also no positive results.

The Blackfriday github page has no good information either. I’ve checked it over and over again. They don’t seem to offer any settings regarding the automatic paragraphs. Or perhaps they do and I missed it?

Is there a posibility of using an alternative Markdown processor in Hugo?

I forgot to mention that it should be chained with safeHTML

Like this: {{ replace .Content "<p></p>" "" | safeHTML }}

Try this before everything else.

Hugo also supports Mmark. See the Docs.