An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: 数学公式支持设置全局宏定义 https://github.com/siyuan-note/siyuan/issues/5682
Liang Dingd510a74aab75
diff --git a/kernel/api/setting.go b/kernel/api/setting.goindex 2664f79e19..6ecd3917f7 100644--- a/kernel/api/setting.go+++ b/kernel/api/setting.go@@ -87,6 +87,10 @@ func setEditor(c *gin.Context) {editor.PlantUMLServePath = "https://www.plantuml.com/plantuml/svg/~1"}+ if "" == editor.KaTexMacros {+ editor.KaTexMacros = "{}"+ }+model.Conf.Editor = editormodel.Conf.Save()diff --git a/kernel/conf/editor.go b/kernel/conf/editor.goindex d787a41cfa..461a78ff94 100644--- a/kernel/conf/editor.go+++ b/kernel/conf/editor.go@@ -33,6 +33,7 @@ type Editor struct {BlockRefDynamicAnchorTextMaxLen int `json:"blockRefDynamicAnchorTextMaxLen"` // 块引动态锚文本最大长度PlantUMLServePath string `json:"plantUMLServePath"` // PlantUML 伺服地址FullWidth bool `json:"fullWidth"` // 是否使用最大宽度+ KaTexMacros string `json:"kaTexMacros"` // KeTex 宏定义}func NewEditor() *Editor {@@ -51,5 +52,6 @@ func NewEditor() *Editor {BlockRefDynamicAnchorTextMaxLen: 96,PlantUMLServePath: "https://www.plantuml.com/plantuml/svg/~1",FullWidth: true,+ KaTexMacros: "{}",}}