🎨 New export settings: Include sub-docs, Include related docs https://github.com/siyuan-note/siyuan/issues/13635

Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2026-01-18 22:58:42 +08:00
parent b2f8807dc0
commit cf79a5db32
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
20 changed files with 112 additions and 8 deletions

View file

@ -55,6 +55,22 @@ export const exportConfig = {
<span class="fn__space"></span>
<input class="b3-switch fn__flex-center" id="inlineMemo" type="checkbox"${window.siyuan.config.export.inlineMemo ? " checked" : ""}/>
</label>
<label class="fn__flex b3-label">
<div class="fn__flex-1">
${window.siyuan.languages.includeSubDocs}
<div class="b3-label__text">${window.siyuan.languages.includeSubDocsTip}</div>
</div>
<span class="fn__space"></span>
<input class="b3-switch fn__flex-center" id="includeSubDocs" type="checkbox"${window.siyuan.config.export.includeSubDocs ? " checked" : ""}/>
</label>
<label class="fn__flex b3-label">
<div class="fn__flex-1">
${window.siyuan.languages.includeRelatedDocs}
<div class="b3-label__text">${window.siyuan.languages.includeRelatedDocsTip}</div>
</div>
<span class="fn__space"></span>
<input class="b3-switch fn__flex-center" id="includeRelatedDocs" type="checkbox"${window.siyuan.config.export.includeRelatedDocs ? " checked" : ""}/>
</label>
<div class="fn__flex b3-label config__item">
<div class="fn__flex-1">
${window.siyuan.languages.ref}
@ -218,6 +234,8 @@ export const exportConfig = {
removeAssetsID: (exportConfig.element.querySelector("#removeAssetsID") as HTMLInputElement).checked,
markdownYFM: (exportConfig.element.querySelector("#markdownYFM") as HTMLInputElement).checked,
inlineMemo: (exportConfig.element.querySelector("#inlineMemo") as HTMLInputElement).checked,
includeSubDocs: (exportConfig.element.querySelector("#includeSubDocs") as HTMLInputElement).checked,
includeRelatedDocs: (exportConfig.element.querySelector("#includeRelatedDocs") as HTMLInputElement).checked,
blockRefMode: parseInt((exportConfig.element.querySelector("#blockRefMode") as HTMLSelectElement).value, 10),
blockEmbedMode: parseInt((exportConfig.element.querySelector("#blockEmbedMode") as HTMLSelectElement).value, 10),
fileAnnotationRefMode: parseInt((exportConfig.element.querySelector("#fileAnnotationRefMode") as HTMLSelectElement).value, 10),

View file

@ -56,7 +56,8 @@ export const initConfigSearch = (element: HTMLElement, app: App) => {
// 导出
getLang(["paragraphBeginningSpace", "md4", "export", "export1", "export2", "export5", "export11",
"export13", "export14", "export15", "export19", "export20", "ref", "blockEmbed", "export17", "export18",
"export23", "export24", "export25", "export26", "export27", "export28", "export29", "removeAssetsID", "removeAssetsIDTip"]),
"export23", "export24", "export25", "export26", "export27", "export28", "export29", "removeAssetsID", "removeAssetsIDTip",
"includeSubDocs", "includeSubDocsTip", "includeRelatedDocs", "includeRelatedDocsTip"]),
// 外观
getLang(["language", "language1", "appearance", "appearance1", "appearance2", "appearance3", "appearance4",

View file

@ -578,6 +578,14 @@ declare namespace Config {
* Whether to export the inline memo
*/
inlineMemo: boolean;
/**
* Whether to include sub-documents when exporting
*/
includeSubDocs: boolean;
/**
* Whether to include related documents when exporting
*/
includeRelatedDocs: boolean;
/**
* Pandoc executable file path
*/