Fix broken image links in API Keys doc#11574
Conversation
Resolves wso2#11557 The includes/design/generate-api-key.md file is built as a standalone mkdocs page (only wip/* is excluded in mkdocs.yml) in addition to being transcluded into secure-apis-using-api-keys.md at a different nesting depth. Hardcoded ../../../../assets/img/... relative paths only resolve correctly for the transcluded (deeper) context, breaking the images on the standalone page. Switched to the {{base_path}}/assets/img/... convention already used throughout the rest of the docs, which resolves correctly regardless of nesting depth.
|
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughUpdated API Keys documentation image links to use WalkthroughUpdated the API key documentation to use 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Purpose
Resolves #11557. Images on the API Keys documentation page (
https://apim.docs.wso2.com/en/latest/includes/design/generate-api-key/) are broken.Goals
Restore the images on that page without breaking the same content when it is transcluded into
secure-apis-using-api-keys.md.Approach
en/docs/includes/design/generate-api-key.mdis built as a standalone mkdocs page (onlywip/*is excluded via theexcludeplugin inen/mkdocs.yml), in addition to being transcluded intosecure-apis-using-api-keys.mdvia{!includes/design/generate-api-key.md!}. The file hardcoded image links as../../../../assets/img/...(4 levels up), which is only correct for the transcluded context (built 4 levels deep) and breaks on the standalone page (built 3 levels deep).Replaced all 8 occurrences with the
{{base_path}}/assets/img/...convention already used throughout the rest of the docs (e.g.en/docs/api-gateway/message-tracing.md), which resolves correctly regardless of nesting depth.User stories
N/A
Release note
Fixed broken image links on the API Keys documentation page.
Documentation
This PR is the documentation fix itself.
Training
N/A
Certification
N/A - no impact on certification exams.
Marketing
N/A
Automation tests
Security checks
Samples
N/A
Related PRs
Companion PR targeting the 4.7.0 branch (same fix, since #11557 reports version 4.7.0).
Migrations (if applicable)
N/A
Test environment
Verified all 8 referenced image files exist at
en/docs/assets/img/learn/api-keys/(anden/docs/assets/img/learn/subscribe-to-api.png) and that the{{base_path}}pattern is the established convention elsewhere in this repo.Learning
Traced the mkdocs build config (
en/mkdocs.yml) to confirm theincludes/directory is not excluded from the build, which is why this file is served as two separate pages at different depths.