Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: redirect all old API docs to new equivalents #17213

Merged
merged 5 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
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
10 changes: 0 additions & 10 deletions docs/dev/api-reference/bigquery-datasets.rst

This file was deleted.

9 changes: 0 additions & 9 deletions docs/dev/api-reference/feeds.rst

This file was deleted.

77 changes: 0 additions & 77 deletions docs/dev/api-reference/index.rst

This file was deleted.

10 changes: 0 additions & 10 deletions docs/dev/api-reference/integration-guide.rst

This file was deleted.

9 changes: 0 additions & 9 deletions docs/dev/api-reference/json.rst

This file was deleted.

10 changes: 0 additions & 10 deletions docs/dev/api-reference/legacy.rst

This file was deleted.

9 changes: 0 additions & 9 deletions docs/dev/api-reference/stats.rst

This file was deleted.

22 changes: 16 additions & 6 deletions docs/dev/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import os
from datetime import datetime


base_dir = os.path.join(os.path.abspath(os.path.dirname(__file__)), "..")

# -- General configuration ------------------------------------------------
Expand All @@ -29,15 +28,26 @@
"myst_parser",
"sphinxcontrib.mermaid",
"sphinx_copybutton",
"sphinx_reredirects",
]

redirects = {
"api-reference/index": "https://docs.pypi.org/api/",
"api-reference/feeds": "https://docs.pypi.org/api/feeds/",
"api-reference/json": "https://docs.pypi.org/api/index-api/",
"api-reference/legacy": "https://docs.pypi.org/api/json/",
woodruffw marked this conversation as resolved.
Show resolved Hide resolved
"api-reference/stats": "https://docs.pypi.org/api/stats/",
"api-reference/integration-guide": "https://docs.pypi.org/api/",
woodruffw marked this conversation as resolved.
Show resolved Hide resolved
"api-reference/bigquery-datasets": "https://docs.pypi.org/api/bigquery",
}

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]

# The suffix of source filenames.
source_suffix = {
".rst": 'restructuredtext',
".md": 'markdown',
".rst": "restructuredtext",
".md": "markdown",
}

# The master toctree document.
Expand All @@ -56,9 +66,9 @@

# Patterns to during `make linkcheck`
linkcheck_ignore = [
r'http://localhost.*',
'http://134.122.111.11', # example IP
'https://web.libera.chat/#pypa,#pypa-dev', # can't visit anchors
r"http://localhost.*",
"http://134.122.111.11", # example IP
"https://web.libera.chat/#pypa,#pypa-dev", # can't visit anchors
]


Expand Down
2 changes: 1 addition & 1 deletion docs/dev/development/legacy-application-structure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ URL Purpose
/security Page giving contact and other information regarding site security
/id OpenID endpoint
/oauth OAuth endpoint
/simple Simple API as given in :doc:`../api-reference/legacy`
/simple Simple API as given in `Index API <https://docs.pypi.org/api/index-api/>`_
/packages Serve up a package file
/mirrors Page listing legacy mirrors (not to be retained)
/serversig Legacy mirroring support (no-one uses it: not to be retained)
Expand Down
2 changes: 1 addition & 1 deletion docs/dev/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Contents:
development/index
application
architecture
api-reference/index
api-reference/xml-rpc
ui-principles
security/index
translations
Expand Down
1 change: 1 addition & 0 deletions requirements/docs-dev.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ sphinx-autobuild
sphinx-copybutton
sphinxcontrib-httpdomain
sphinxcontrib-mermaid
sphinx-reredirects
myst-parser
5 changes: 5 additions & 0 deletions requirements/docs-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ sphinx==8.1.3 \
# sphinx-autobuild
# sphinx-basic-ng
# sphinx-copybutton
# sphinx-reredirects
# sphinxcontrib-httpdomain
# sphinxcontrib-mermaid
sphinx-autobuild==2024.10.3 \
Expand All @@ -363,6 +364,10 @@ sphinx-copybutton==0.5.2 \
--hash=sha256:4cf17c82fb9646d1bc9ca92ac280813a3b605d8c421225fd9913154103ee1fbd \
--hash=sha256:fb543fd386d917746c9a2c50360c7905b605726b9355cd26e9974857afeae06e
# via -r requirements/docs-dev.in
sphinx-reredirects==0.1.5 \
--hash=sha256:444ae1438fba4418242ca76d6a6de3eaee82aaf0d8f2b0cac71a15d32ce6eba2 \
--hash=sha256:cfa753b441020a22708ce8eb17d4fd553a28fc87a609330092917ada2a6da0d8
# via -r requirements/docs-dev.in
sphinxcontrib-applehelp==2.0.0 \
--hash=sha256:2f29ef331735ce958efa4734873f084941970894c6090408b079c61b2e1c06d1 \
--hash=sha256:4cd3f0ec4ac5dd9c17ec65e9ab272c9b867ea77425228e68ecf08d6b28ddbdb5
Expand Down
Loading