Skip to content

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

:bug: Load the configured light theme for PDF export https://github.com/siyuan-note/siyuan/issues/20151

Danieldaf0ff1df552
diff --git a/app/src/protyle/export/index.ts b/app/src/protyle/export/index.ts
index e6738e5466..306808ebd3 100644
--- a/app/src/protyle/export/index.ts
+++ b/app/src/protyle/export/index.ts
@@ -212,7 +212,7 @@ const renderPDF = async (id: string) => {
// 导出预览临时页可能由不同于主窗口的内核端口提供,使用相对路径可确保资源和接口保持同源。
const servePathWithoutTrailingSlash = "";
const servePath = "/";
- const isDefault = (window.siyuan.config.appearance.mode === 1 && window.siyuan.config.appearance.themeDark === "midnight") || (window.siyuan.config.appearance.mode === 0 && window.siyuan.config.appearance.themeLight === "daylight");
+ const isDefault = window.siyuan.config.appearance.themeLight === "daylight";
let themeStyle = "";
if (!isDefault) {
themeStyle = `<link rel="stylesheet" type="text/css" id="themeStyle" href="${servePath}appearance/themes/${window.siyuan.config.appearance.themeLight}/theme.css?${Constants.SIYUAN_VERSION}"/>`;