pub fn generate_html(
file_name: &str,
md_elements: &[MdBlockElement],
output_dir: &str,
input_dir: &str,
html_rel_path: &str,
) -> String
Expand description
Generates an HTML string from a vector of MdBlockElements
§Arguments
file_name
- The name of the markdown file, used to set the title of the HTML document.md_elements
- A vector ofMdBlockElement
instances representing the markdown content.output_dir
- The directory where the generated HTML file will be saved.input_dir
- The directory where the markdown files are located, used for relative paths.html_rel_path
- The relative path to the HTML file from the output directory, used for linking resources.
§Returns
Returns a String
containing the generated HTML.