mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-14 19:18:06 +01:00
🎨 Built-in Pandoc export .docx template https://github.com/siyuan-note/siyuan/issues/16861
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
1f02650b38
commit
1012d8b486
11 changed files with 44 additions and 4 deletions
|
|
@ -1262,6 +1262,14 @@ func subscribeConfEvents() {
|
|||
eventbus.Subscribe(util.EvtConfPandocInitialized, func() {
|
||||
logging.LogInfof("pandoc initialized, set pandoc bin to [%s]", util.PandocBinPath)
|
||||
Conf.Export.PandocBin = util.PandocBinPath
|
||||
|
||||
params := util.RemoveInvalid(Conf.Export.PandocParams)
|
||||
if !strings.Contains(params, "--reference-doc") && "" != util.PandocTemplatePath {
|
||||
params += " --reference-doc"
|
||||
params += " \"" + util.PandocTemplatePath + "\""
|
||||
Conf.Export.PandocParams = strings.TrimSpace(params)
|
||||
}
|
||||
|
||||
Conf.Save()
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue