def transform_url(private_urls):
    """
    Transforms URL returned by removing the public/ (name of the local folder with all hugo html files)
    into "real" documentation links for Algolia
    :param private_urls: Array of file links in public/ to transform into doc links.
    :return new_private_urls: A list of documentation URL links that correspond to private doc files.
    """
    new_private_urls = []

    for url in private_urls:

        ## We add /$ to all links in order to make them all "final", in fact
        ## Algolia stop_url parameter uses regex and not "perfect matching" link logic
        new_private_urls.append(url.replace('public/','docs.datadoghq.com/') + '/$')

    return new_private_urls