Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Doc: add hardcoded links to the official docs
  • Loading branch information
humitos committed Apr 9, 2024
commit 7c27128c15289261c530d457eb580bde1f7405f9
29 changes: 27 additions & 2 deletions Doc/tools/templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,35 @@
document.addEventListener("readthedocs-addons-data-ready", function(event) {
event.detail.initialize();
event.detail.data().then((config) => {
// TODO: add `selected="selected"` to option
// Add some mocked hardcoded versions pointing to the official
// documentation while migrating to Read the Docs.
// These are only for testing purposes.
// TODO: remove them when managing all the versions on Read the Docs,
// since all the "active, built and not hidden" versions will be shown automatically.
let versions = config.versions.active.concat([
{
slug: "dev (3.13)",
urls: {
documentation: "https://docs.python.org/3.13/",
}
},
{
slug: "3.12",
urls: {
documentation: "https://docs.python.org/3.12/",
}
},
{
slug: "3.11",
urls: {
documentation: "https://docs.python.org/3.11/",
}
},
]);

const versionSelect = `
<select id="version_select">
${ config.versions.active.map(
${ versions.map(
(version) => `
<option
value="${ version.slug }"
Expand Down