Skip to content

Conversation

@TristanCacqueray
Copy link
Contributor

This change resolves the relative note image path to make an absolute url.

For blog/post.md with a ![img](media/image.png), the og:image is:

  • Before: siteUrl/media/image.png
  • After: siteUrl/blog/media/image.png

@srid
Copy link
Owner

srid commented Jul 1, 2024

cc @shivaraj-bh

Copy link
Owner

@srid srid left a comment

Choose a reason for hiding this comment

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

I'm not entirely sure about this change. Been a while since I worked on Emanote, but IIRC link and image URLs are not always considered relative.

In any case, we need to tests before being able to make changes like this.

TristanCacqueray added a commit to TristanCacqueray/tristancacqueray.github.io that referenced this pull request Jul 1, 2024
@TristanCacqueray
Copy link
Contributor Author

In any case, we need to tests before being able to make changes like this.

You are absolutely right, let me convert this to a draft. There are other papercuts in the og:description that I'd like to fix (like wikilink not being rendered properly and the footnote). Is there an example test we could use to validate such fixes?

@TristanCacqueray TristanCacqueray marked this pull request as draft July 2, 2024 10:51
This change resolves the relative note image path to make
an absolute url.

For `blog/post.md` with a `![img](media/image.png)`, the og:image is:
- Before: `siteUrl/media/image.png`
- After:  `siteUrl/blog/media/image.png`
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