Skip to content

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

:art: 导出 PDF/HTML 时遵循是否显示书签、命名等设置 Fix https://github.com/siyuan-note/siyuan/issues/6333

Liang Ding1f03ae95bd9d
diff --git a/kernel/model/export.go b/kernel/model/export.go
index 10368b7df0..863a637d65 100644
--- a/kernel/model/export.go
+++ b/kernel/model/export.go
@@ -1208,7 +1208,7 @@ func exportTree(tree *parse.Tree, wysiwyg, expandKaTexMacros, keepFold bool) (re
if Conf.Export.AddTitle {
if root, _ := getBlock(id); nil != root {
- title := &ast.Node{Type: ast.NodeHeading, HeadingLevel: 1}
+ title := &ast.Node{Type: ast.NodeHeading, HeadingLevel: 1, KramdownIAL: parse.Map2IAL(root.IAL)}
content := html.UnescapeString(root.Content)
title.AppendChild(&ast.Node{Type: ast.NodeText, Tokens: []byte(content)})
ret.Root.PrependChild(title)