module

Sc

Class methods

available_shortcodes
Source
kv_deps_for_file(path : String) : Array(String)

kv:// inputs for the shortcode templates a content file needs, so tasks that render it can declare them as dependencies. This does not instantiate a Markdown::File (which would register the file in the global posts hash).

Source
load_shortcodes

Load shortcodes from shortcodes/ and put them in the k/v store Pending: refactor duplication from Templates.load_templates

Source
render_failures
Source
render_sc(sc, context : Crinja::Context) : String

Render shortcode using its template

Source
reset_failures

Clear recorded failures (called at the start of each run)

Source
shortcodes_in(text) : Array(Shortcodes::Shortcode)

Recursively collect all shortcodes in a text, including shortcodes nested inside other shortcodes' bodies

Source
unescape(sc : Shortcodes::Shortcode) : String

Strip Hugo's escape markers from an escaped shortcode's source span: {{</* name args */>}} becomes literal {{< name args >}}, everything in between is preserved verbatim

Source