Skip to content

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

:art: https://github.com/siyuan-note/siyuan/issues/16152

Vanessad04565e58808
diff --git a/app/src/protyle/export/index.ts b/app/src/protyle/export/index.ts
index 8ab42b08e3..8206ce1fd9 100644
--- a/app/src/protyle/export/index.ts
+++ b/app/src/protyle/export/index.ts
@@ -634,6 +634,7 @@ const getExportPath = (option: IExportOptions, removeAssets?: boolean, mergeSubd
}
});
};
+/// #endif
export const onExport = async (data: IWebSocketData, filePath: string, exportOption: IExportOptions, removeAssets?: boolean, msgId?: string) => {
let themeName = window.siyuan.config.appearance.themeLight;
@@ -715,8 +716,9 @@ id="preview">${data.data.content}</div>
if (typeof filePath === "undefined") {
return html;
}
+ /// #if !BROWSER
const htmlPath = path.join(filePath, "index.html");
fs.writeFileSync(htmlPath, html);
afterExport(htmlPath, msgId);
+ /// #endif
};
-/// #endif