jxpeng98 / obsidian-to-NotionNext

Share obsidian markdown file to any Notion database and generate notion share link 同步obsdian文件到任意Notion数据库。
GNU General Public License v3.0
39 stars 3 forks source link

对于图床图片链接的识别问题 #20

Closed yoghurtlee-thu closed 3 months ago

yoghurtlee-thu commented 4 months ago

如题。在文章中含有图床图片的链接的时候,在 Notion 中只留下了一个链接,没有嵌入图片。希望开发大佬能修复一下。

此外万分感谢大佬的这款宝藏插件解决了我的发布需求!Have a day as amazing as you are~

jxpeng98 commented 4 months ago

@yoghurtlee-thu

如题。在文章中含有图床图片的链接的时候,在 Notion 中只留下了一个链接,没有嵌入图片。希望开发大佬能修复一下。

此外万分感谢大佬的这款宝藏插件解决了我的发布需求!Have a day as amazing as you are~

你说的是图床的外链吗?这个渲染的话是没问题。

image image

但如果你想要的是Notion 网页bookmark的效果, 例如

image

这个暂时还弄不了。

如果方便的话,你再稍微详细说一下你的这个问题。

yoghurtlee-thu commented 4 months ago

@yoghurtlee-thu

如题。在文章中含有图床图片的链接的时候,在 Notion 中只留下了一个链接,没有嵌入图片。希望开发大佬能修复一下。 此外万分感谢大佬的这款宝藏插件解决了我的发布需求!Have a day as amazing as you are~

你说的是图床的外链吗?这个渲染的话是没问题。

image image 但如果你想要的是Notion 网页bookmark的效果, 例如 image

这个暂时还弄不了。

如果方便的话,你再稍微详细说一下你的这个问题。

大概就是这样:

这是 Obsidian 中的效果:

image

分享到 NotionNext Database 之后只剩下链接了。

image

jxpeng98 commented 3 months ago

我尝试复现了一下。

这个应该是图片链接不规范导致的。

image

在markdown文件转换过程中用到了martian这个库。 你可以看一些这个说明:图片链接必须要是规范可用的。

Images

Inline images are extracted from the paragraph and added afterwards (as these are not supported in notion)
Image urls are validated, if they are not valid as per the Notion external spec, they will be inserted as text for you to fix manually

我之前的回答里有一个截图,你可以放在你的obsidian试一试

![](https://minioapi.pjx.ac.cn/img1/2024/04/dea63c88b74d844e6780139b08ae5b4d.png)
yoghurtlee-thu commented 3 months ago

我尝试复现了一下。

这个应该是图片链接不规范导致的。 image

在markdown文件转换过程中用到了martian这个库。 你可以看一些这个说明:图片链接必须要是规范可用的。

Images 图片

Inline images are extracted from the paragraph and added afterwards (as these are not supported in notion)
Image urls are validated, if they are not valid as per the Notion external spec, they will be inserted as text for you to fix manually

我之前的回答里有一个截图,你可以放在你的obsidian试一试

![](https://minioapi.pjx.ac.cn/img1/2024/04/dea63c88b74d844e6780139b08ae5b4d.png)

应该是这样的,我的图片全都是 .webp 格式,那个库可能没办法将这个后缀识别为图片。感谢大佬。

jxpeng98 commented 3 months ago

我在martian提了PR,把webp加了进去。他们如果之后又更新,我也会更新一下依赖包。然后你的需求应该就可以解决了。