render_template

SolidGroundUX DocumentationSolidGroundUX
NL

fn: render_template

Purpose

Render a website HTML template with supplied substitutions.

Signature

def render_template(template: str, context: dict[str, Any]) -> str:

Arguments

  • template: Template content to render.
  • context: Values available for template placeholder substitution.

Usage

html = render_template(template_text, {"site": {"title": "Documentation"}})