Skip to content

Conversation

mlr
Copy link
Contributor

@mlr mlr commented Sep 28, 2023

This updates the svg handlerbars helper so the svg is rendered with an img tag rather than attempting to read the content of the svg file and return that to the rendered page.

The reason this is necessary is because at build time, the path to the UI bundle isn't the same as when running a UI preview build. By using an image tag we can simply refer to the uiRootPath so the image knows where to look when the page is compiled to its static HTML

To test:

  1. Pull down and checkout this branch
  2. Run gulp bundle
  3. In the datastax docs site repo, refer to the UI bundle path given with the output of the above command
  4. run npm run build:develop for the datastax docs site
  5. Navigate to the tutorial template and see that the collab svg is rendering for the Run this on Colab button

image

@mlr mlr requested a review from eric-schneider September 28, 2023 17:40
Copy link
Contributor

@eric-schneider eric-schneider left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great on my local build!

@mlr mlr merged commit af3ca28 into main Sep 28, 2023
@eric-schneider eric-schneider deleted the svg-img branch September 28, 2023 18:11
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

Successfully merging this pull request may close these issues.

2 participants