def rst_link_filter(text, url):
    """Jinja2 filter creating RST link

    >>> rst_link_filter("bla", "https://somewhere")
    "`bla <https://somewhere>`_"
    """
    if url:
        return "`{} <{}>`_".format(text, url)
    return text