From f599a4223cc68886ef7c37103437c77bab5493b6 Mon Sep 17 00:00:00 2001 From: pengzhanbo Date: Mon, 1 Dec 2025 11:28:21 +0800 Subject: [PATCH] fix(theme): llmstxt should exclude encrypt page (#761) --- theme/src/node/plugins/llms.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/theme/src/node/plugins/llms.ts b/theme/src/node/plugins/llms.ts index 42db193b..138beaf2 100644 --- a/theme/src/node/plugins/llms.ts +++ b/theme/src/node/plugins/llms.ts @@ -118,10 +118,12 @@ export function llmsPlugin(app: App, userOptions: true | LlmsPluginOptions): Plu return tableOfContent } - const options = getThemeConfig() return [rawLlmsPlugin({ // 启用全站加密、或者页面被加密的情况下不启用 - filter: page => options.encrypt?.global ? false : !isEncryptPage(page as Page, options.encrypt), + filter: (page) => { + const options = getThemeConfig() + return options.encrypt?.global ? false : !isEncryptPage(page as Page, options.encrypt) + }, ...userLLMsTxt, llmsTxtTemplateGetter: { toc: tocGetter,