star7th / showdoc

ShowDoc is a tool greatly applicable for an IT team to share documents online一个非常适合IT团队的在线API文档、技术文档工具
https://www.showdoc.com.cn
Other
12.18k stars 2.18k forks source link

上传本地Markdown文件无法识别图片 #2143

Open Dovices opened 7 months ago

Dovices commented 7 months ago

当我上传一个在本地写好的Markdown文件时,文档中图片路径是用的本地路径 非在线图库,showdoc只识别了文档不识别图片,文档中图片较多 能否优化一下

star7th commented 7 months ago

没办法优化,你只能手冻上传上来。

Dovices @.***>于2024年2月5日 周一下午5:44写道:

当我上传一个在本地写好的Markdown文件时,文档中图片路径是用的本地路径 非在线图库,showdoc只识别了文档不识别图片,文档中图片较多 能否优化一下

— Reply to this email directly, view it on GitHub https://github.com/star7th/showdoc/issues/2143, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQZHLSYHCBQL7RCMPZ22H3YSCSXXAVCNFSM6AAAAABCZZ2Q6OVHI2DSMVQWIX3LMV43ASLTON2WKOZSGEYTQMBZGM4DSNQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Dovices commented 7 months ago

可是我涉及好几千个文档 我现在公司打算文档全迁移到这个上面来 有没有什么办法

star7th commented 7 months ago

本地的图片,showdoc 无法读取的。没有办法。

Dovices @.***>于2024年2月5日 周一下午5:48写道:

可是我涉及好几千个文档 我现在公司打算文档全迁移到这个上面来 有没有什么办法

— Reply to this email directly, view it on GitHub https://github.com/star7th/showdoc/issues/2143#issuecomment-1926588643, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQZHLR4DXC24AMOW5I6QGTYSCTG7AVCNFSM6AAAAABCZZ2Q6OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRWGU4DQNRUGM . You are receiving this because you commented.Message ID: @.***>

Dovices commented 7 months ago

有无办法批量上传图片 然后去批量换掉文档中相关图片的路径呢

star7th commented 7 months ago

你可以尝试改写程序或者写脚本实现,showdoc 目前确实没有这个功能。

Dovices @.***>于2024年2月5日 周一下午5:51写道:

有无办法批量上传图片 然后去批量换掉文档中相关图片的路径呢

— Reply to this email directly, view it on GitHub https://github.com/star7th/showdoc/issues/2143#issuecomment-1926594093, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQZHLQBQIGYYKHMEPSJEYLYSCTSXAVCNFSM6AAAAABCZZ2Q6OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRWGU4TIMBZGM . You are receiving this because you commented.Message ID: @.***>

Dovices commented 7 months ago

我不是开发 程序或者脚本对我太高难度了 你们有没有其他的现成的方案

star7th commented 7 months ago

没有现成的方案的。如果很多用户反馈的话,我可以探索这块出个官方方案。但目前短期内没有现成方案。

Dovices @.***>于2024年2月5日 周一下午5:54写道:

我不是开发 程序或者脚本对我太高难度了 你们有没有其他的现成的方案

— Reply to this email directly, view it on GitHub https://github.com/star7th/showdoc/issues/2143#issuecomment-1926599417, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQZHLR7AMCUDM2AMWJMZVLYSCT5LAVCNFSM6AAAAABCZZ2Q6OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRWGU4TSNBRG4 . You are receiving this because you commented.Message ID: @.***>

feko2018 commented 2 months ago

1.先导出旧upload_file表 sqlite3 html/Sqlite/showdoc.db.php .dump upload_file

直接复制语句,注意修改id不要与现有的重复

2.在已存在的环境内,导入旧upload_file表 sqlite3 html/Sqlite/showdoc.db.php 把复制的语句直接粘贴,注意最好分多段粘贴 3.拷贝html/Public/Uploads 附件目录到新的环境内 4.在新的环境,修改绝对路径为相对路径 sqlite3 html/Sqlite/showdoc.db.php sqlite> UPDATE page SET page_content = replace(page_content, 'http://你的域名', ''); sqlite> UPDATE page SET page_content = replace(page_content, 'https://你的域名', ''); sqlite> UPDATE upload_file SET real_url = replace(real_url, 'http://你的域名', ''); sqlite> UPDATE upload_file SET real_url = replace(real_url, 'https://你的域名', '');