diff --git a/osf_tests/test_generate_sitemap.py b/osf_tests/test_generate_sitemap.py index 673183f75ae..664fe6c0907 100644 --- a/osf_tests/test_generate_sitemap.py +++ b/osf_tests/test_generate_sitemap.py @@ -133,10 +133,10 @@ def all_included_links(self, user_admin_project_public, user_admin_project_priva urls_to_include.extend([ user_admin_project_public.url, user_admin_project_private.url, - project_registration_public.url, - project_preprint_osf.url, - project_preprint_other.url, - registration_active.url, + project_registration_public.url + 'overview', + project_preprint_osf.url + 'overview', + project_preprint_other.url + 'overview', + registration_active.url + 'overview', f'/preprints/{provider_osf._id}/{preprint_osf._id}', f'/preprints/{provider_osf._id}/{preprint_osf_version._id}', f'/preprints/{provider_other._id}/{preprint_other._id}', @@ -182,18 +182,18 @@ def test_private_project_link_not_included(self, project_private, create_tmp_dir with mock.patch('website.settings.STATIC_FOLDER', create_tmp_directory): urls = get_all_sitemap_urls() - assert urljoin(settings.DOMAIN, project_private.url) not in urls + assert urljoin(settings.DOMAIN, project_private.url + 'overview') not in urls def test_embargoed_registration_link_not_included(self, registration_embargoed, create_tmp_directory): with mock.patch('website.settings.STATIC_FOLDER', create_tmp_directory): urls = get_all_sitemap_urls() - assert urljoin(settings.DOMAIN, registration_embargoed.url) not in urls + assert urljoin(settings.DOMAIN, registration_embargoed.url + 'overview') not in urls def test_deleted_project_link_not_included(self, project_deleted, create_tmp_directory): with mock.patch('website.settings.STATIC_FOLDER', create_tmp_directory): urls = get_all_sitemap_urls() - assert urljoin(settings.DOMAIN, project_deleted.url) not in urls + assert urljoin(settings.DOMAIN, project_deleted.url + 'overview') not in urls diff --git a/scripts/generate_sitemap.py b/scripts/generate_sitemap.py index d7c92deae34..7091c63144d 100644 --- a/scripts/generate_sitemap.py +++ b/scripts/generate_sitemap.py @@ -191,7 +191,7 @@ def generate(self): for obj in objs: try: config = settings.SITEMAP_NODE_CONFIG - config['loc'] = urljoin(settings.DOMAIN, '/{}/'.format(obj['guids___id'])) + config['loc'] = urljoin(settings.DOMAIN, '/{}/overview'.format(obj['guids___id'])) config['lastmod'] = obj['modified'].strftime('%Y-%m-%d') self.add_url(config) except Exception as e: