Skip to content

Image CDN should be aware of different doc versions #317

Open

Description

@jeffwang0516

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'

Activity

  1. shczhen commented on Jul 22, 2022

    @shczhen
    Contributor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions