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

导出为 HTML 时提供将图片资源文件使用 base64 编码后嵌入选项 #3581

Closed
Zuoqiu-Yingyi opened this issue Dec 7, 2021 · 2 comments

Comments

@Zuoqiu-Yingyi
Copy link
Contributor

在什么情况下你需要该特性? In what scenarios do you need this function?

有时需要分享一篇笔记(需要在离线环境中查看), 但是又想尽可能得保留编辑器中的样式, 因此选择 HTML 导出, 但是这样导出的图片都是请求本地图床的图片 http://127.0.0.1:6806/assets/..., 不仅不能分享, 而且在思源没启动时也不能加载图片, 这就没有任何意义了😂

描述可能的最优解决方案 Describe the optimal solution

将所有引用的本地图片使用 base64 编码后嵌入再导出

描述候选的解决方案 Describe the candidate solution

使用 pandoc 进行文件转换时设置 --self-contained 选项

@88250
Copy link
Member

88250 commented Dec 8, 2021

这个之前考虑过,但是还有其他静态资源文件(js/css)也是依赖 127.0.0.1 的,要处理的话估计需要一并解决。

https://ld246.com/article/1638894554619

@88250
Copy link
Member

88250 commented Jan 12, 2022

#3797 中以 assets 文件夹方式处理。

@88250 88250 closed this as completed Jan 12, 2022
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

No branches or pull requests

2 participants