def html_path(builder, pagename=None):
    """Calculate the relative path to the Slides for pagename."""

    return builder.get_relative_uri(
        pagename or builder.current_docname,
        os.path.join(
            builder.app.config.slide_html_relative_path,
            pagename or builder.current_docname,
        ))
Calculate the relative path to the Slides for pagename.