Fix broken image links in API Keys doc (4.7.0)#11575
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.
|
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ 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 (reported against version 4.7.0). Images on the API Keys documentation page 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, 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 master branch (same fix).
Migrations (if applicable)
N/A
Test environment
Verified all 8 referenced image files exist under
en/docs/assets/img/learn/on the 4.7.0 branch 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.