Function inline_assets::inline_html_string[][src]

pub fn inline_html_string<P: AsRef<Path>>(
    html: &str,
    root_path: P,
    inline_fonts: bool
) -> Result<String, FilePathError>

Returns a Result<String, FilePathError> with all the assets linked in the the html string inlined.

Arguments

  • html - The html string.
  • root_path - The root all relative paths in the html will be evaluated with, usually this is the folder the html file is in.
  • inline_fonts - Whether or not to inline fonts in the css as base64.