From 70ac4d3743e3d4b6b45be0b6c06ad2ebb908c64f Mon Sep 17 00:00:00 2001 From: Lucas Jia Date: Mon, 10 Aug 2026 12:34:45 -0700 Subject: [PATCH] docs: Show V2 deprecation note on every documentation page Move the deprecation note from the landing page (index.rst) into the layout.html theme override so it renders at the top of every page, including theme-generated pages (genindex, py-modindex, search) that have no .rst source. The injected markup mirrors a Sphinx note admonition so styling matches the original landing-page note. --- doc/_templates/layout.html | 17 +++++++++++++++++ doc/index.rst | 6 ------ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/doc/_templates/layout.html b/doc/_templates/layout.html index 90fdceb9e6..4ddf583196 100644 --- a/doc/_templates/layout.html +++ b/doc/_templates/layout.html @@ -8,3 +8,20 @@ {{ super() }} {% endblock %} + +{# Deprecation banner. Overriding the "document" block places this note at the #} +{# top of the main content area of EVERY page -- including theme-generated pages #} +{# with no .rst source (genindex, py-modindex, search) that rst_prolog cannot #} +{# reach. The markup mirrors a Sphinx ".. note::" admonition so it picks up the #} +{# exact same sphinx_rtd_theme styling as the original landing-page note. #} +{% block document %} +
+

Note

+

Version 2.x of the SageMaker Python SDK is on a deprecation path. + For the latest features and continued support, see the SageMaker Python SDK + V3 documentation. + For version lifecycle, see + this page.

+
+ {{ super() }} +{% endblock %} diff --git a/doc/index.rst b/doc/index.rst index 3355f3b036..eae5b692c2 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -2,12 +2,6 @@ Amazon SageMaker Python SDK ########################### -.. note:: - Version 2.x of the SageMaker Python SDK is on a deprecation path. - For the latest features and continued support, see the SageMaker Python SDK - `V3 documentation `_. - For version lifecycle, see `this page `_. - Amazon SageMaker Python SDK is an open source library for training and deploying machine-learned models on Amazon SageMaker. With the SDK, you can train and deploy models using popular deep learning frameworks, algorithms provided by Amazon, or your own algorithms built into SageMaker-compatible Docker images.