def METHOD_NAME(link: Link, out_dir: Optional[str]=None) -> None:
    out_dir = out_dir or link.link_dir
    rendered_html = link_details_template(link)
    atomic_write(str(Path(out_dir) / HTML_INDEX_FILENAME), rendered_html)