Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: Supports converting relative path hyperlinks into document block references after importing Markdown https://github.com/siyuan-note/siyuan/issues/13817

Danielc2157ca0608f
diff --git a/kernel/model/import.go b/kernel/model/import.go
index aae23bd31b..b49c442b7e 100644
--- a/kernel/model/import.go
+++ b/kernel/model/import.go
@@ -873,6 +873,11 @@ func ImportFromLocalPath(boxID, localPath string, toPath string) (err error) {
}
if d.IsDir() {
+ if "assets" == d.Name() {
+ // 如果是 assets 文件夹则跳过,里面的 Markdown 文件算作资源文件 https://github.com/siyuan-note/siyuan/issues/13817
+ return nil
+ }
+
if subMdFiles := util.GetFilePathsByExts(currentPath, []string{".md", ".markdown"}); 1 > len(subMdFiles) {
// 如果该文件夹中不包含 Markdown 文件则不处理 https://github.com/siyuan-note/siyuan/issues/11567
return nil