Skip to content

Commit 0fbf0e1

Browse files
committed
docs(sphinx): redirect the remaining pre-10.0 pages and the retired preview page
The Wayback Machine's capture list for sdk.pinecone.io/python/ and the old working-with-indexes toctree turn up five more pages the first pass missed: the four db_control index guides (serverless, pod, shared actions, shared configs) and reference/preview.html, which shipped with the 10.0 release candidates and went away when the preview namespace graduated. The preview stub points at the migration guide's section on that removal. The class-anchor remap now only runs for stubs that forward into reference/, which is the only place those anchors ever appeared, and a target that names its own section keeps it rather than having the old fragment appended after it.
1 parent 9eda88d commit 0fbf0e1

2 files changed

Lines changed: 17 additions & 7 deletions

File tree

docs/_templates/redirect.html

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
var target = "${to_uri}";
1111
var hash = window.location.hash;
1212
// Classes that were renamed or moved to a different page in 10.0. Each row is
13-
// the old autodoc id, the page the class now lives on, and its new id. A hash
14-
// is either the class id itself or that id followed by ".<member>", and the
15-
// member name is kept. Old ids are unique across the old pages, so one table
16-
// serves every redirect stub.
13+
// the old autodoc id, the reference/ page the class now lives on, and its new
14+
// id. A hash is either the class id itself or that id followed by ".<member>",
15+
// and the member name is kept. Old ids are unique across the old pages, so
16+
// one table serves every stub that forwards into reference/.
1717
var classes = [
1818
["pinecone.db_data.Index", "sync-index.html", "pinecone.index.Index"],
1919
["pinecone.db_data.IndexAsyncio", "async-index.html", "pinecone.async_client.async_index.AsyncIndex"],
@@ -34,12 +34,15 @@
3434
"grpc.html#db-data-plane": "grpc.html"
3535
};
3636
var page = window.location.pathname.split("/").pop();
37-
var dir = target.substring(0, target.lastIndexOf("/") + 1);
37+
var dir = "reference/";
3838
var moved = sections[page + hash];
39-
if (moved) {
39+
if (target.indexOf("#") !== -1) {
40+
// The target names its own section; the old fragment has nothing to add.
41+
hash = "";
42+
} else if (moved) {
4043
target = dir + moved;
4144
hash = "";
42-
} else if (hash) {
45+
} else if (hash && target.indexOf(dir) === 0) {
4346
var id = hash.substring(1);
4447
for (var i = 0; i < classes.length; i++) {
4548
var oldId = classes[i][0];

docs/conf.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,15 @@
5151
"client-configuration": "getting-started/authentication.html",
5252
"working-with-indexes": "how-to/indexes/serverless.html",
5353
"db_control/collections": "../how-to/collections.html",
54+
"db_control/serverless-indexes": "../how-to/indexes/serverless.html",
55+
"db_control/pod-indexes": "../how-to/indexes/pod.html",
56+
"db_control/shared-index-actions": "../how-to/indexes/serverless.html",
57+
"db_control/shared-index-configs": "../how-to/indexes/serverless.html",
5458
"db_data/index-usage-byov": "../how-to/vectors/upsert-and-query.html",
5559
"inference/inference-api": "../how-to/inference/embeddings.html",
60+
# Published with the 10.0 release candidates, removed when the preview
61+
# namespace graduated.
62+
"reference/preview": "../migration/v10-migration.html#preview-namespace-removed",
5663
}
5764

5865
exclude_patterns = [

0 commit comments

Comments
 (0)