blark.html.format_file_as_html

blark.html.format_file_as_html(input_filename: Path | str, *, header: str = '<html><body>', footer: str = '</body></html>') str[source]

Helper for formatting a file as HTML.

Parameters:
input_filenamepathlib.Path or str

The source code filename. Any supported by blark.parse.

headerstr, optional

HTML header to include in the output. Defaults to html and body opening tags.

footerstr, optional

HTML footer to include in the output. Defaults to html and body closing tags.