Skip to content

Commit

Permalink
Docs Port for sitemap update to master (#27977)
Browse files Browse the repository at this point in the history
### Details:
 - *item1*
 - *...*

### Tickets:
 - *ticket-id*
  • Loading branch information
akopytko authored Dec 9, 2024
1 parent de776f2 commit 1dbb890
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,6 @@ def extract_hierarchy(link):
return ';'.join(hierarchy)

def format_segment(segment):
if segment == 'c_cpp_api': segment = 'c_c++_api'
if segment == 'c_cpp_api': segment = 'c/C++_api'

return ' '.join(word.capitalize() for word in segment.replace('-', ' ').replace('_', ' ').split())
4 changes: 2 additions & 2 deletions docs/sphinx_setup/_static/js/custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ function getCurrentVersion() {
if (wordAfterDomain === 'cn') {
wordAfterDomain = link[2];
}
if (["index.html", "404.html", "", "latest"].indexOf(wordAfterDomain) >= 0) {
if (["index.html", "404.html", ""].indexOf(wordAfterDomain) >= 0) {
/*
* If this landing page, 404 or domain.com we should get first version
* */
Expand Down Expand Up @@ -426,7 +426,7 @@ document.addEventListener('DOMContentLoaded', function () {
const searchInterfaceSa = document.querySelector("#sa-search");
const searchInterface = document.querySelector("#search");
const currentVersion = getCurrentVersion();

await initializeSearchInterface(searchInterfaceSa, currentVersion);
await initializeSearchInterface(searchInterface);

Expand Down

0 comments on commit 1dbb890

Please sign in to comment.