docs: add version warning banner for outdated documentation pages#4728
Open
niceysam wants to merge 2 commits intoboto:developfrom
Open
docs: add version warning banner for outdated documentation pages#4728niceysam wants to merge 2 commits intoboto:developfrom
niceysam wants to merge 2 commits intoboto:developfrom
Conversation
Add a new guide covering common Amazon Bedrock Runtime use cases using the Converse API, which is the recommended interface for conversational workloads. Examples included: - Basic message with the Converse API - System prompt usage - Multi-turn conversation - Streaming responses with converse_stream - Cross-region inference with model ID prefix - Error handling for ThrottlingException and ModelNotReadyException The Converse API is preferred over the lower-level InvokeModel for most use cases because it provides a unified message format across all supported foundation models.
When users land on a versioned URL (e.g. /api/1.35.6/...) via search engines or bookmarks, they may not realize they're reading outdated documentation. This adds a lightweight JavaScript banner that: - Detects versioned URLs at runtime (/api/<semver>/ pattern) - Injects a visible note linking to the equivalent /api/latest/ page - Also links to the upgrade instructions - Has no effect on /api/latest/ pages Closes boto#4368
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #4368
When users land on a versioned URL (e.g.
/api/1.35.6/...) via search engines or bookmarks, they may be reading documentation for an old release without realising it. This is a source of confusion, as noted in the issue and the linked examples.What this does
Adds
docs/source/_static/version_warning.js— a small self-contained script that:/api/<semver>//api/latest/page/api/latest/pages — the banner is never shown thereThe script is registered in
conf.pyvia the existinghtml_js_fileslist, so it is automatically included in every generated HTML page.Banner wording (matches the proposal in #4368):
The banner uses inline styles so it requires no extra CSS file and works with the existing Furo theme.