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,