Skip to content

Commit 2452b22

Browse files
authored
docs: Show V2 deprecation note on every documentation page (#6172)
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.
1 parent 5fe426d commit 2452b22

2 files changed

Lines changed: 17 additions & 6 deletions

File tree

‎doc/_templates/layout.html‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,20 @@
88
{{ super() }}
99
<meta name="robots" content="noindex">
1010
{% endblock %}
11+
12+
{# Deprecation banner. Overriding the "document" block places this note at the #}
13+
{# top of the main content area of EVERY page -- including theme-generated pages #}
14+
{# with no .rst source (genindex, py-modindex, search) that rst_prolog cannot #}
15+
{# reach. The markup mirrors a Sphinx ".. note::" admonition so it picks up the #}
16+
{# exact same sphinx_rtd_theme styling as the original landing-page note. #}
17+
{% block document %}
18+
<div class="admonition note">
19+
<p class="admonition-title">Note</p>
20+
<p>Version 2.x of the SageMaker Python SDK is on a deprecation path.
21+
For the latest features and continued support, see the SageMaker Python SDK
22+
<a class="reference external" href="https://sagemaker.readthedocs.io/">V3 documentation</a>.
23+
For version lifecycle, see
24+
<a class="reference external" href="https://sagemaker.readthedocs.io/en/stable/lifecycle.html">this page</a>.</p>
25+
</div>
26+
{{ super() }}
27+
{% endblock %}

‎doc/index.rst‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@
22
Amazon SageMaker Python SDK
33
###########################
44

5-
.. note::
6-
Version 2.x of the SageMaker Python SDK is on a deprecation path.
7-
For the latest features and continued support, see the SageMaker Python SDK
8-
`V3 documentation <https://sagemaker.readthedocs.io/>`_.
9-
For version lifecycle, see `this page <https://sagemaker.readthedocs.io/en/stable/lifecycle.html>`_.
10-
115
Amazon SageMaker Python SDK is an open source library for training and deploying machine-learned models on Amazon SageMaker.
126

137
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.

0 commit comments

Comments
 (0)