def baseref_to_github(base_url, baseref):
    """ Convert the url to github """
    if baseref is None:
        return None

    replacement_url = "https://github.com/corda/docs-site/tree/staging/content/en"
    return baseref.replace(base_url, replacement_url).replace(".html", ".md")