def METHOD_NAME(self, obj):
    project_data = self._get_project_data(obj)
    if project_data:
        docs_url = project_data.version.docs_url
        path = obj.full_path
        # Generate an appropriate link for the doctypes that use htmldir,
        # and always end it with / so it goes directly to proxito.
        # For a generic doctype we just strip the index.html part if it exists.
        if obj.doctype in {SPHINX_HTMLDIR, MKDOCS, GENERIC}:
            path = re.sub("(^|/)index.html$", "/", path)
        return docs_url.rstrip("/") + "/" + path.lstrip("/")
    return None