4.47. kink/doc/render/html/HTML_RENDER_TOOL¶
Launcheable mod to render a kink doc to a single HTML file.
Usage: kink [Kink_options]... mod:kink/doc/render/html/HTML_RENDER_TOOL [Mod_options] <JSON >HTML
The command reads the kink doc JSON from the standard input, converts it to a single HTML file, and writes it to the standard output.
Mod_options
• --style {Style_file_path} : gives the file path of the alternative CSS file. The file content must be encoded by UTF-8. It is inserted in the style element of the HTML file.
• --template {Template_file_path} : gives the file path of the alternative HTML template file. See the next section for details.
HTML template content
The HTML template must be encoded by UTF-8, and be a Str.format template string. It can contain placeholders `{Title}` for the HTML-escaped document title, `{Style}` for the CSS, and `{Body}` for the content of <body> element.
The default template is as follows:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>{Title}</title>
<style>
{Style}
</style>
</head>
<body>
{Body}
</body>
</html>
Exit statuses
If the command generates an HTML file successfully, it exits with 0 as the exit status.
If not, the command exits with a non-zero exit status.
Usage example
$ kink mod:kink/doc/DOC_PARSE_TOOL --title 'API reference' src >doc.json
...
$ kink mod:kink/doc/render/html/HTML_RENDER_TOOL <doc.json >doc.html
4.47.1. HTML_RENDER_TOOL.main(Argv)¶
Launcher of the mod.