| 开发者 | shinobiashi |
|---|---|
| 更新时间 | 2026年10月12日 22:17 |
| PHP版本: | 8.2 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
BreadcrumbList structured dataQAPage structured data; the archive gets FAQPage structured dataDefinedTerm structured data on each term's page?format=markdownmodified_after), plus a full-dump JSONL/CSV download from the admin screen — ideal for feeding a support chatbot or RAG indexsaai_* actions/filters so other plugins and themes can customize or extend it.
Source code and build process
SAAI Knowledge is developed in the open. The complete, human-readable source — including the un-minified JavaScript and SCSS under src/ that the compiled files under build/ are generated from — is maintained at:
https://github.com/shinobiashi/saai-knowledge
The free plugin is the plugins/saai-knowledge/ directory of that repository.
The build uses @wordpress/scripts (webpack + Babel) and needs Node.js and npm; the project's CI builds with Node.js 24. To reproduce the compiled files from source:
git clone https://github.com/shinobiashi/saai-knowledge.gitcd saai-knowledgenpm installnpm run buildnpm run build compiles plugins/saai-knowledge/src/** into plugins/saai-knowledge/build/**. No third-party JavaScript library is bundled: the only module the front-end scripts import is @wordpress/interactivity, which WordPress itself provides at runtime.
Looking for WooCommerce integration?
SAAI Knowledge for WooCommerce, a companion add-on that links FAQ/KB/Glossary content to products and product categories and displays it on product pages, is planned as a separately sold, optional purchase — it isn't available yet and is not required to use this plugin.
/wp-content/plugins/saai-knowledge directory, or install through the WordPress Plugins screen.Yes. Both block themes and classic themes are supported. Block-theme users get dedicated templates for the Knowledge Base hub, category archives, and individual articles; classic-theme users get the same layout through the classic template hierarchy.
Yes. FAQ answers and other collapsible content are always present in the page's initial HTML; JavaScript only controls the open/close interaction. Search engines and AI crawlers that don't execute JavaScript still see the full content.
Yes. A single "Markdown & llms.txt" setting controls the ?format=markdown output, the llms.txt index, and the SEO-plugin description integration together. The REST export endpoint and the admin-side JSONL/CSV download aren't affected by this setting — the REST endpoint only ever returns already-public content, and the admin download requires the same capability as the rest of Settings.
SAAI Knowledge for WooCommerce, a companion add-on that links FAQ/KB/Glossary content to products and product categories and displays it on product pages, is planned as a separately sold, optional purchase — it isn't available yet and is not required to use this plugin.
No. SAAI Knowledge does not call any external API or service; all processing happens on your own site.
content_plain field of the RAG export (the REST endpoint and the admin download) now contains the characters themselves instead of HTML character references such as & or ’. Records you have already imported through incremental sync (modified_after) keep the old text until their post is updated, so run one full export to refresh them. Text such as <script> written in a post now appears as those characters, so escape content_plain (as you already would title) before inserting it into HTML.?format=markdown, the llms.txt index, and the RAG export's content_markdown), text such as <script> or © written in a post's text or its title is now written as character references (<script>, ©), so a Markdown renderer shows those characters instead of reading them as HTML or as a character reference. As with content_plain above, run one full export to refresh records you have already imported. Cached Markdown pages and the llms.txt index update on their own within a day.<script>, was rendered as HTML, and a heading was shown as plain text. Text at the start of a line is now escaped wherever it appears, so a line such as ~~~ or # in a Custom HTML block can't open a code block or become a heading. Code blocks are written as fenced code blocks, so if you render this Markdown to HTML with a library that doesn't fully support them, sanitize the resulting HTML: Python-Markdown, for example, doesn't read them without one of those extensions, or inside a quote even with one. The full export mentioned above refreshes records you have already imported.\{, \}), so Python-Markdown's attr_list extension (part of its extra extension) and similar extensions, such as markdown-it-attrs, no longer read text such as {: onclick=... } at the end of a heading or right after a link or emphasized text as HTML attributes of that element. The full export mentioned above refreshes records you have already imported.sections no longer splits the Markdown it's in, and neither does a carriage return in a code block inside a quote or a table. The next line could start Markdown of its own or fall outside the quote or table, or a blank line could leave inline code unclosed, so text such as <img onerror=...> in inline code or in such a code block, or a <script> in a code sample after such an image, category or heading, was rendered as HTML. Inline code now has a space where the line break was, which is how Markdown already displays it, and a link or image address drops line breaks and tabs, as browsers already do. The full export mentioned above refreshes records you have already imported.’ for an apostrophe in an article title or & for an ampersand in a category name, as the structured data of FAQs and glossary terms already did.<!--<script> in a glossary term's definition, or in inline code in an FAQ's answer, no longer hides the rest of the page. The page's structured data (JSON-LD) contained that text as written, which kept the browser from finding where the structured data ended, so it treated everything after it as part of it: a glossary term's page was blank, and on an FAQ's page, the scripts at the end of the page were lost. < and > in the structured data are now written as the JSON escapes \u003C and \u003E, which search engines read as the same characters.title of an item added through the saai_llms_index_items filter is now treated as plain text, like the plugin's own titles, so a character reference in it, such as the & that get_the_title() returns for an ampersand, appears in the llms.txt index as written instead of as the character. Pass the title as plain text, for example decoded with html_entity_decode().[saai_faq] shortcode or the FAQ List block) in a WooCommerce product description no longer breaks the rest of the product page. Rendering the FAQ answers cleared the product that WooCommerce had set up for the page, so, depending on the theme, the Reviews tab could fail with a fatal error, or the Reviews tab and related products could silently disappear.languages/ directory and the Domain Path header have been removed accordingly.build/ from the un-minified sources under src/.