[Doc-SIG] Moving language and version switchers out of cpython
Julien Palard
julien at palard.fr
Thu Jun 4 19:12:33 EDT 2020
Hi doc-sig and release managers,
I'd like the simplify the maintenance of the language and version
switchers of docs.python.org.
The current implementation lies in cpython's
Doc/tools/static/switchers.js, witch contains a hardcoded list of
languages and versions (that has to be updated on each new release and
each new language, and backported in multiple branches).
It can be enhanced by a clearer separation:
- cpython Doc/ would build a simple standalone documentation, without
switchers.
- docsbuild-script would be responsible to add the switchers.
Pro: We do no longer need to keep an up-to-date list of languages and
version in all cpython branches, a single commit in docsbuild-scripts
would update all switchers.
Con: Maybe, somewhere, someone is building a private version of
docs.python.org, without docsbuild-script, and will be sad to see the
switchers disapear. The probablility is low as they would have to have
the same URLs as us (/{language}/{version}/), the same languages, and
the same versions build, as all is imposed by switchers.js.
I opened an issue [1] and a draft PR [2] to experiment around the idea,
there's still some work to do, but I have to sleep.
What do you think?
[1]: https://github.com/python/docsbuild-scripts/issues/90
[2]: https://github.com/python/docsbuild-scripts/pull/91
--
[Julien Palard](https://mdk.fr)
More information about the Doc-SIG
mailing list