Render Page in Markdown

Hello,

I want my main page to render all my posts in “full markdown” (in contrast to markdownify) so that they look exactly as they do on their respective pages.

For that I loop over all pages and then try to render them with .Render .Content

{{ range .Pages }}
        <article class="post {{ .Site.Language.LanguageName }}">
        <div class="row">
          <div class="col-xs-12">
            <h1 class="post-title"><a href="{{ .RelPermalink }}">{{ .Title }}</a></h1>              
            <div class="post-content markdown-body">
              {{ .Render .Content }}
            </div>
          </div>
        </div>
      </article>
    {{ end }}

But Hugo fails building the page with the error: <.Content>: wrong type for value; expected string; got template.HTML

So since .Render seems to be for strings, what can I do to Render the “HTML template” as markdown?

Best Regards,
Jan

Hi!

{{ .Content }} implies markdownify, so to speak.

You should get your desired results by just leaving out .Render.

Mhm, maybe it’s an stylesheet issue then. Is there anything I have to include for the markdown to be displayed properly?

image

Is the part

"Declaration via …

a blockquote?

You can use your browser’s inspector to check whether it is wrapped by <blockquote>…</blockquote> on both pages. If so, it is probably a CSS issue as you mentioned.

The source code seems identical. Thanks for the help, I will try to figure out what CSS is missing.