diff --git a/docs/openvino_custom_sphinx_sitemap/openvino_custom_sphinx_sitemap/__init__.py b/docs/openvino_custom_sphinx_sitemap/openvino_custom_sphinx_sitemap/__init__.py index 586d6eeeeaf783..bb26683cd9e579 100644 --- a/docs/openvino_custom_sphinx_sitemap/openvino_custom_sphinx_sitemap/__init__.py +++ b/docs/openvino_custom_sphinx_sitemap/openvino_custom_sphinx_sitemap/__init__.py @@ -72,8 +72,6 @@ def create_sitemap(app, exception): else: version = "" - url = ET.SubElement(root, "url") - scheme = app.config.sitemap_url_scheme unique_links = set() while True: try: @@ -84,11 +82,14 @@ def create_sitemap(app, exception): except queue.Empty: break + url = ET.SubElement(root, "url") + if app.builder.config.language: lang = app.builder.config.language + "/" else: lang = "" - + + scheme = app.config.sitemap_url_scheme ET.SubElement(url, "loc").text = site_url + scheme.format( lang=lang, version=version, link=link ) @@ -129,5 +130,5 @@ def process_coveo_meta(meta, url, link): def process_link(link): if '/' in link: - return link.split('/')[0] - return link.split('.html')[0] \ No newline at end of file + return link.split('/')[0].replace("-", " ") + return link.split('.html')[0].replace("-", " ") \ No newline at end of file