Files
hugo/content/en/functions/RenderString.md
T
Joe Mooring f3fb791a4f Remove dated new-in flags (#1879)
This removes new-in flags older than v0.92.0, which was released at the
beginning of 2022.

Closes #1877
2022-11-10 21:33:45 -08:00

1.1 KiB

title, description, date, categories, menu, keywords, signature
title description date categories menu keywords signature
.RenderString Renders markup to HTML. 2019-12-18
functions
docs
parent
functions
markdown
goldmark
render
.RenderString MARKUP

.RenderString is a method on Page that renders some markup to HTML using the content renderer defined for that page (if not set in the options).

The method takes an optional map argument with these options:

display ("inline")
inline or block. If inline (default), surrounding <p></p> on short snippets will be trimmed.
markup (defaults to the Page's markup)
See identifiers in List of content formats.

Some examples:

{{ $optBlock := dict "display" "block" }}
{{ $optOrg := dict "markup" "org" }}
{{ "**Bold Markdown**" | $p.RenderString }}
{{  "**Bold Block Markdown**" | $p.RenderString  $optBlock }}
{{  "/italic org mode/" | $p.RenderString  $optOrg }}

{{< new-in "0.93.0" >}} Note: markdownify uses this function in order to support Render Hooks.