diff --git a/layout/_plugins/tianli_gpt.ejs b/layout/_plugins/tianli_gpt.ejs
index 866dd6f..28051d8 100644
--- a/layout/_plugins/tianli_gpt.ejs
+++ b/layout/_plugins/tianli_gpt.ejs
@@ -1,4 +1,7 @@
-<% if (['all', page.layout].includes(theme.plugins.tianli_gpt.field)) { %>
+<%
+const { field } = theme.plugins.tianli_gpt;
+const matchesField = field === 'all' || field === layout || (field === 'wiki' && page.wiki) || (field === 'topic' && page.topic);
+if (matchesField) { %>
-<% } %>
\ No newline at end of file
+<% } %>