Context
Some projects serve the latest release directly from unversioned URLs while also publishing versioned documentation with mike. For example, prek's documentation root serves the same documentation as the latest release and configures extra.version.default: latest.
Description
When the current URL does not match a version or alias in versions.json, the version selector should try the configured default version and its aliases before falling back to the first entry. Exact URL matches should remain higher priority. If no default is configured, latest should remain the implicit default.
Related links
Use Cases
At the time of writing, the unversioned root at prek.j178.dev serves version 0.4.14, which has the latest alias. Because dev is the first entry in versions.json, the selector currently shows dev. With the proposed fallback, the root would show 0.4.14 (latest), while /dev/ and all versioned URLs would continue to use their exact URL matches.
This also lets other projects keep stable, unversioned documentation URLs without making the selector depend on the ordering of versions.json. Sites whose URLs already match a version are unchanged, and sites without a matching configured default retain the existing first-entry fallback.
Before submitting
Context
Some projects serve the latest release directly from unversioned URLs while also publishing versioned documentation with mike. For example, prek's documentation root serves the same documentation as the latest release and configures
extra.version.default: latest.Description
When the current URL does not match a version or alias in
versions.json, the version selector should try the configured default version and its aliases before falling back to the first entry. Exact URL matches should remain higher priority. If no default is configured,latestshould remain the implicit default.Related links
Use Cases
At the time of writing, the unversioned root at prek.j178.dev serves version
0.4.14, which has thelatestalias. Becausedevis the first entry inversions.json, the selector currently showsdev. With the proposed fallback, the root would show0.4.14 (latest), while/dev/and all versioned URLs would continue to use their exact URL matches.This also lets other projects keep stable, unversioned documentation URLs without making the selector depend on the ordering of
versions.json. Sites whose URLs already match a version are unchanged, and sites without a matching configured default retain the existing first-entry fallback.Before submitting