def add_404_page(app):
    """Build an extra ``404.html`` page if no ``"404"`` key is in the
    ``html_additional_pages`` config.
    """
    is_epub = isinstance(app.builder, EpubBuilder)
    config_pages = app.config.html_additional_pages

    if not is_epub and "404" not in config_pages:
        yield ("404", {}, "404.html")