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

Improve importing Markdown folder #11567

Closed
TCOTC opened this issue May 28, 2024 · 7 comments
Closed

Improve importing Markdown folder #11567

TCOTC opened this issue May 28, 2024 · 7 comments
Assignees
Milestone

Comments

@TCOTC
Copy link
Contributor

TCOTC commented May 28, 2024

改进导入 Markdown 文件夹

导入 Markdown 文件夹时,如果其中的某一个文件夹下没有任何 .md 文件,那么就不需要在对应的目录位置创建同名的空白文档,只需要将其中的资源文件移动到 assets 文件夹里就行了。

并且要注意:不是忽略名为 assets 的文件夹(因为 assets 也可以是父文档名),而是在创建文档时忽略其中没有任何 .md 文件的文件夹。

image

https://ld246.com/article/1716885416114

@88250 88250 self-assigned this May 29, 2024
@88250 88250 changed the title 改进导入 Markdown 文件夹 Improve importing Markdown folder May 29, 2024
@88250 88250 added this to the 3.1.0 milestone May 29, 2024
@88250 88250 closed this as completed May 29, 2024
@TCOTC
Copy link
Contributor Author

TCOTC commented May 29, 2024

@88250 看一下能不能兼容 FlowUs 导出的 Markdown 文件夹?

使用最新的思源测试:https://github.com/TCOTC/siyuan/releases/tag/v3.1.0-dev001

① 在 FlowUs 里的目录结构:

image

② 导出的 Markdown 文件夹压缩包:

测试+FlowUs+9b8a06e7-6e6e-48d6-b136-2a06b5636bd9.zip

③ 导入思源后:(划线的是有重复创建的文档)

image

④ 文档内的链接不能指向导入的其他文档:

image

image

@88250
Copy link
Member

88250 commented May 29, 2024

感谢提议,但是不考虑为特定导出格式进行适配了。

@TCOTC
Copy link
Contributor Author

TCOTC commented May 29, 2024

我又试了一下,原来思源导出的 Markdown 文件夹再导入也是不行的,不会链接到已导入的文档:

image

@TCOTC
Copy link
Contributor Author

TCOTC commented May 29, 2024

导入 Markdown 文件夹,里面的文档有办法支持互相链接吗?

@88250
Copy link
Member

88250 commented May 29, 2024

不支持相对路径处理的。

@TCOTC
Copy link
Contributor Author

TCOTC commented May 29, 2024

是技术上很复杂吗?

@88250
Copy link
Member

88250 commented May 29, 2024

也不算太复杂,主要是没有时间处理。

另外,Markdown 中的文件链接目前来看多半是 [[wikilink]] 的格式,这种格式我们已经处理过了,所以处理超链接的相对路径场景不多。

@88250 88250 modified the milestones: 3.1.0, 3.0.17 May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants