Skip to main content

to_html

Function to_html 

Source
pub fn to_html(
    jigs: impl Iterator<Item = &'static JigMeta>,
    title: &str,
    editor: Option<&str>,
) -> String
Expand description

Render the pipeline rooted at the entry jig (the first jig returned by the iterator) as a complete HTML document. title is shown in the page header and <title> tag.

editor is an optional URL template containing {line} plus either {path} (absolute file path, for local IDE handlers) or {rel_path} (path relative to the workspace root, for repo URLs). When set, the sidebar’s file location becomes a link using the resolved template; when None, it renders as plain text. Common templates:

  • VS Code / Cursor / Windsurf: vscode://file/{path}:{line}
  • VSCodium: vscodium://file/{path}:{line}
  • JetBrains IDEs: idea://open?file={path}&line={line}
  • Sublime Text: subl://{path}:{line}
  • TextMate: txmt://open/?url=file://{path}&line={line}
  • GitHub: https://github.com/OWNER/REPO/blob/main/{rel_path}#L{line}