Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image CDN should be aware of different doc versions #317

Open
jeffwang0516 opened this issue Jul 18, 2022 · 1 comment
Open

Image CDN should be aware of different doc versions #317

jeffwang0516 opened this issue Jul 18, 2022 · 1 comment

Comments

@jeffwang0516
Copy link

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:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. 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:

Screenshots

  • dev
    image

  • v5.2
    image

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:

const IMAGE_CDN_PREFIX = 'https://download.pingcap.com/images'

@shczhen
Copy link
Contributor

shczhen commented Jul 22, 2022

Hi @jeffwang0516 , thanks for your advise.

In current docs scenario, it's better to keep image consist. It is beneficial to the reuse of static resources. Besides, it's a big mission for doc team to update all image references.

But your advice is still very suitable for our next doc website idea. It's clear and helpful if we maintain common/versioned static media files for doc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants