pingcap / pingcap/website-docs
Image CDN should be aware of different doc versions
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 23
- Forks
- 33
- Avg merge
- 3d 5h
- Merged PRs (30d)
- 7
Description
Describe the bug
Currently, changing the version of the document does not load images from specific branch.
i.e. all versions share the same image source from CDN https://download.pingcap.com
To Reproduce
Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected behavior
For each version maintained, have corresponding CDN path that stores the images from their branch
Take docs v5.2 as example:
- media dir https://github.com/pingcap/docs/tree/release-5.2/media
- CDN path: https://download.pingcap.com/v5.2/
Screenshots
-
dev

-
v5.2

The src of the image is always the same
Desktop (please complete the following information):
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context
Related code: https://github.com/pingcap/website-docs/blob/e612ad0095cea2c2e40d179d80eb3df253bf7ea1/packages/download/utils.js#L17
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at packages/download/utils.js around line 17 and compare how the selected document version determines its image source. Verify the release-5.2 example against the media directory and CDN path; done means each maintained version resolves images from its corresponding versioned CDN location.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- documentation, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100