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

Fix(mark doc)/relative image pathing #11761

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

chappelo
Copy link

@chappelo chappelo commented Aug 18, 2024

Changes

closes #10546

  • While using markdoc custom image node if a relative url is passed as src, the image wasn't rendered on webpage. This was fixed by repathing the relative.

Testing

  • I tested this by modifying examples/blog to override markdoc’s default image node and then test relative paths, public and http links.

  • Different src paths all render correctly on webpage:

![test](./test.png)
![test](../test.jpg)
![test](/test.jpg)
![test](../../../test.jpg)
![test](https://imageIfound.jpg)

Docs

Copy link

changeset-bot bot commented Aug 18, 2024

🦋 Changeset detected

Latest commit: dc105b8

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the pkg: integration Related to any renderer integration (scope) label Aug 18, 2024
@chappelo chappelo marked this pull request as draft August 18, 2024 12:23
@chappelo chappelo marked this pull request as ready for review August 18, 2024 13:49
@chappelo chappelo marked this pull request as draft August 19, 2024 17:23
@chappelo chappelo changed the title Fix(mark doc)/relative image Fix(mark doc)/relative image pathing Aug 20, 2024
@chappelo chappelo marked this pull request as ready for review August 20, 2024 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: integration Related to any renderer integration (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Relative image syntax does not work with Markdoc custom image node
1 participant