Skip to content

Commit

Permalink
QF Sitemap Url wrapper (openvinotoolkit#26971)
Browse files Browse the repository at this point in the history
### Details:
 - *item1*
 - *...*

### Tickets:
 - *ticket-id*
  • Loading branch information
akopytko authored Oct 9, 2024
1 parent 37957c9 commit 168c1e5
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
)
Expand Down Expand Up @@ -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]
return link.split('/')[0].replace("-", " ")
return link.split('.html')[0].replace("-", " ")

0 comments on commit 168c1e5

Please sign in to comment.