diff options
Diffstat (limited to 'documentation/sphinx-static/switchers.js.in')
-rw-r--r-- | documentation/sphinx-static/switchers.js.in | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/documentation/sphinx-static/switchers.js.in b/documentation/sphinx-static/switchers.js.in index 7eb0c2ff34..1e523a188f 100644 --- a/documentation/sphinx-static/switchers.js.in +++ b/documentation/sphinx-static/switchers.js.in | |||
@@ -9,6 +9,10 @@ by https://git.yoctoproject.org/yocto-autobuilder-helper/tree/scripts/run-docs-b | |||
9 | (function() { | 9 | (function() { |
10 | 'use strict'; | 10 | 'use strict'; |
11 | 11 | ||
12 | var all_releases = | ||
13 | ALL_RELEASES_PLACEHOLDER | ||
14 | ; | ||
15 | |||
12 | var switcher_versions = { | 16 | var switcher_versions = { |
13 | VERSIONS_PLACEHOLDER | 17 | VERSIONS_PLACEHOLDER |
14 | }; | 18 | }; |
@@ -155,6 +159,14 @@ by https://git.yoctoproject.org/yocto-autobuilder-helper/tree/scripts/run-docs-b | |||
155 | var new_url = docroot + new_versionpath + url.replace(docroot, ""); | 159 | var new_url = docroot + new_versionpath + url.replace(docroot, ""); |
156 | var fallback_url = docroot + new_versionpath; | 160 | var fallback_url = docroot + new_versionpath; |
157 | } else { | 161 | } else { |
162 | // check for named releases (e.g. dunfell) in the subpath | ||
163 | $.each(all_releases, function(idx, release) { | ||
164 | if (docroot.endsWith('/' + release + '/')) { | ||
165 | current_version = release; | ||
166 | return false; | ||
167 | } | ||
168 | }); | ||
169 | |||
158 | var new_url = url.replace('/' + current_version + '/', '/' + new_versionpath); | 170 | var new_url = url.replace('/' + current_version + '/', '/' + new_versionpath); |
159 | var fallback_url = new_url.replace(url.replace(docroot, ""), ""); | 171 | var fallback_url = new_url.replace(url.replace(docroot, ""), ""); |
160 | } | 172 | } |