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 dcce229308da24..93b8aed8d90046 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 @@ -141,8 +141,13 @@ def extract_hierarchy(link): if segments and segments[-1].endswith('.html'): segments = segments[:-1] + if segments and '.' in segments[0]: + year, *rest = segments[0].split('.') + if year.isdigit() and len(year) == 4: + segments[0] = year + hierarchy = [] for i in range(1, len(segments) + 1): hierarchy.append('|'.join(segments[:i])) - - return ';'.join(hierarchy) \ No newline at end of file + + return ';'.join(hierarchy)