The problem however is, that it renders shortcodes as raw text without considering the fact that it’s actually a shortcode. Is there a way to avoid this behaviour and still consider shortcodes as shortcodes and not only as raw text? Or would you recommend another way to split the content of a markdown file in multiple/two parts?
+++
title = "Test"
date = 2021-03-31T08:58:49-07:00
draft = false
+++
This is the content for the **first** section.
{{< p >}}
I am _emphasized_ text.
{{< /p >}}
[SECTION-BREAK]
This is the content for the **second** section.
And the shortcode for testing (layouts/shortcodes/p.html)
<p>{{ .Inner | .Page.RenderString }}</p>
In the original solution I used .RawContent so that we could use an HTML comment to split the sections, without having to set markup.goldmark.renderer.unsafe to true in the site configuration file. So I let the choice of delimiter dictate the approach.
In this revision, we’ve changed the delimiter to something that is not recognized as HTML, so we can use .Content (fully rendered) instead of .RawContent.
thank you very much for your answer. That is very understandable. I even tried changing .RawContent to .Content, however I didn’t consider using a delimiter that is not recognized as HTML.