summaryrefslogtreecommitdiffstats
path: root/documentation/sphinx-static/switchers.js.in
Commit message (Collapse)AuthorAgeFilesLines
* docs: sphinx-static: switchers.js.in: do not mark branches as outdatedQuentin Schulz2022-04-251-1/+1
| | | | | | | | | | | Branches can never be outdated so let's check the release is not a branch (branches end with .999). Cc: Quentin Schulz <foss+yocto@0leil.net> (From yocto-docs rev: 4755961bbb5f674a7532b91cca20ea44a1e22ae7) Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* docs: sphinx-static: switchers.js.in: fix broken switcher for branchesQuentin Schulz2022-04-251-0/+12
| | | | | | | | | | | | | | | | | | The switcher expects URL subpath to match the "release" used by sphinx to build the documentation. Branches, however, are put in a subpath after their name (e.g. dunfell) while sphinx sets the "release" to X.Y.999. This means the switcher cannot replace correctly the path to switch between releases/versions. Let set_versions.py inject the list of release names into the switchers.js.in file so it can check whether the subpath is one of the release names in which case it needs to be stripped. Cc: Quentin Schulz <foss+yocto@0leil.net> (From yocto-docs rev: 5ef3d129b8d0d8ae98a694103930988a46285525) Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* docs: sphinx-static: switchers.js.in: rename all_versions to switcher_versionsQuentin Schulz2022-04-251-3/+3
| | | | | | | | | | | | | | This array only contains versions that can be selected through the dropdown menu for switching between supported versions. Therefore, let's rename it to switcher_versions to make its usecase clearer. Cc: Quentin Schulz <foss+yocto@0leil.net> (From yocto-docs rev: 5c3d67751bf3f572a0788d3a4734b80e3453d084) Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* docs: update Bitbake objects.inv location for master branchQuentin Schulz2022-04-251-4/+2
| | | | | | | | | | | | master branch of Bitbake is now located at docs.yoctoproject.org/dev instead of docs.yoctoproject.org so let's update the switchers and set_versions.py to reflect that change. Cc: Quentin Schulz <foss+yocto@0leil.net> (From yocto-docs rev: 18338292d99ed236e2bac6e73a5152ef11c4a9e5) Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* docs: sphinx-static: switchers.js.in: improve obsolete version detectionQuentin Schulz2022-04-191-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | Based on additional information per release, specifically with the obsolescence status of a release, the obsolescence detection can now be much smarter than just checking if the release is older than dunfell. This is required because with LTS (dunfell for example) releases, it is now possible to have LTS releases that are older than obsolete releases. This means obsolete releases need to be tracked and only the release version cannot be used as an indicator of obsolescence. Let's use the obsolete field of the per-release data in the all_versions dictionary to display correct warning messages. The warning message is first about outdated version if there's a newer one available (*even* if it is for an obsolete release, e.g. 3.0.1 will say it's outdated and should select 3.0.4 version instead), then if the version is the last of the release, show a warning message if the release is obsolete. Cc: Quentin Schulz <foss+yocto@0leil.net> (From yocto-docs rev: 6986baa0d3b544bbad8a7e23ee447abc6f2769f6) Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* docs: set_versions.py: add information about obsolescence of a releaseQuentin Schulz2022-04-191-6/+6
| | | | | | | | | | | | This adds support for marking releases as obsolete to make the detection algorithm smarter (in a later commit) than just checking if it's older than dunfell. Cc: Quentin Schulz <foss+yocto@0leil.net> (From yocto-docs rev: 6f40ef56054ecbd3d8b7310d748c1af78a689add) Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* docs: sphinx-static: switchers.js.in: remove duplicate for outdated versionsQuentin Schulz2022-04-191-3/+0
| | | | | | | | | | | | | | | | | | | | | | Since commit f2b069be8c307 "set_versions: Various improvements", an outdated version will always appear in all_versions, meaning there'll always be an exact match in the loop (just above the git context of this patch) so there's no need to add the current_version to the dropdown menu manually. This issue showed up only for outdated versions of obsolete releases, e.g. 3.2.3. In that case, 3.2.4 (latest version of the obsolete release) will appear in the all_versions array in addition to 3.2.3, which means the check on release series (3.2) will be matched twice, and 3.2.3 will be printed once in the 3.2.4 loop because version != current_version and once in the 3.2.3 because it is an exact match to an entry in all_versions. Cc: Quentin Schulz <foss+yocto@0leil.net> (From yocto-docs rev: 05065fa1f3855e8b7d9e8af0502b4ae402273400) Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* set_versions/switchers.js: Allow switchers.js version information to be ↵Richard Purdie2022-03-231-0/+238
autogenerated A horrible blunt hammer approach to updating the version information in switchers.js based on the available tag information. To merge and work correctly, this will need a change to the autobuilder-helper docs generation code to pull the swicthers.js and script from master, then to run the script. That should hopefully remove the need for other patching even on old docs branches though. (From yocto-docs rev: dc858c8b2ffdb792fe8cef05fab3d752aa858f78) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>