[WordPress] 外掛分享: LLM Friendly

首頁外掛目錄 › LLM Friendly
WordPress 外掛 LLM Friendly 的封面圖片
10+
安裝啟用
尚無評分
7 天前
最後更新
問題解決
WordPress 6.0+ PHP 7.4+ v0.1.2 上架:2026-01-15

內容簡介

總結:LLM Friendly 外掛為您的 WordPress 網站新增了兩項功能,分別是 /llms.txt 與 Markdown 匯出。這些功能可以方便 LLMs,索引機器人和喜歡純文本的使用者操作網站。

1. 這個外掛增加了哪兩個功能至您的 WordPress 網站?
- /llms.txt:包含網站的主要連結和每種文章類型的最新項目清單。您可以透過「設定→ LLM Friendly→ llms.txt→『排除項目』」來排除個別條目。
- Markdown 匯出:揭露選定文章類型的 .md 終端點。每個條目都可以通過「Markdown覆蓋」側邊欄面板(或經典編輯器顯示框)覆蓋其Markdown主體,同時也可以通過相同設置頁面進行排除。

2. 這項功能對於哪些用戶或應用程式有幫助?
- 對於 LLMs,索引機器人,以及喜歡純文本的使用者有幫助。
- 可以透過 llms_show_excerpt 選擇在 llms.txt 中啟用摘要,並透過 md_send_noindex 將 X-Robots-Tag: noindex, nofollow 送達 Markdown 匯出,以便不希望被搜索引擎索引的Markdown專用消費者。
- 若自動Markdown轉換不適用於文章,可以使用「Markdown覆蓋」側邊欄面板(古韻博客編輯器)或經典編輯器顯示框提供自定義Markdown或基於區塊的替換。

3. 這個外掛的關鍵功能有哪些?
- llms.txt 終端點具有緩存生成、可選摘要、可配置的自定義Markdown區塊,以及逐條排除列表。
- 選定文章類型的Markdown匯出,具有Gutenberg-to-Markdown轉換,每一條文章都共用llms.txt的排除列表。
- 可配置的匯出基本路徑(例如「llm」),以及每篇文章類型的啟用/停用切換;更改基本路徑需要刷新重新覆寫。
- llms.txt 具有ETag/Last-Modified標頭的手動或自動重新生成。
- 可選用於 /llms.txt 和 Markdown匯出的X-Robots-Tag: noindex, nofollow;Markdown標題由md_send_noindex控制。
- 通過 llms_show_excerpt 切換llms.txt 中的摘要以在每個項目下添加一行摘要。
- 可選的站點標題/說明覆蓋,以及用於生成llms.txt的站點地圖URL字段。

4. 這個外掛的需求是什麼?
- WordPress 6.0+ 和 PHP 7.4+。
- 如果不滿足需求,外掛會顯示管理通知,並停止運行。

外掛標籤

開發者團隊

⬇ 下載最新版 (v0.1.2) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「LLM Friendly」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

LLM Friendly gives your WordPress site predictable, machine-readable entry points for AI assistants, search/indexing bots, internal knowledge tools, and readers who prefer plain text.
Instead of asking crawlers to infer your site structure from HTML alone, the plugin publishes a focused /llms.txt index and optional Markdown versions of selected public content. You stay in control of what is exposed, how dense the index should be, which endpoints should be noindexed, and which posts or pages should be excluded.
What the plugin creates

/llms.txt

The generated llms.txt file includes the site title and description, main links, sitemap and RSS references, an Essential section for important pages or curated resources, and recent items grouped by selected post type. Items can link to Markdown exports when Markdown is enabled, or to canonical HTML URLs when it is not.

Markdown exports

For selected public, publicly queryable post types, the plugin exposes .md endpoints under:
/{base}/{post_type}/{path}.md

Each Markdown export includes a JSON metadata block with title, URL, published and modified dates, language, description, author, and publisher, followed by a Markdown conversion of the post content. Singular views also receive alternate Markdown links, so compatible tools can discover the plain-text version.
Why site owners use it

Give AI tools a concise map of your most useful public content.
Offer Markdown versions of posts, pages, and safe public custom post types without changing the canonical HTML experience.
Keep Markdown endpoints out of search results by default with separate noindex controls for /llms.txt and .md exports.
Add short AI-facing descriptions from a per-post field, SEO meta description, excerpt, or generated content summary.
Exclude individual items from both /llms.txt and Markdown exports without changing their WordPress visibility.
Preview generated llms.txt content before relying on the public endpoint.
Review practical AI crawler policy guidance for OAI-SearchBot, GPTBot, Googlebot/Search AI features, and Google-Extended.

Key features

llms.txt endpoint with cached generation, ETag/Last-Modified support, main links, sitemap/RSS references, an Essential section, selected post-type sections, optional item descriptions, and an optional custom Markdown notes block.
Markdown exports for selected public, publicly queryable post types with Gutenberg/HTML-to-Markdown conversion, JSON metadata, canonical Link headers, alternate Markdown discovery links, and transient-based body caching.
Overview dashboard with endpoint status, cache status, noindex status, sitemap URL, and quick copy buttons for /llms.txt and the Markdown URL pattern.
Configurable Markdown base path, for example /llm/post/example.md, with post type controls for posts, pages, and safe public custom post types.
Per-post-type exclusion picker with live title search, selected-item lists, clear buttons, and server-side validation.
Separate noindex header controls for /llms.txt and Markdown exports.
Auto or manual llms.txt regeneration; manual rebuilds are available from the Maintenance panel.
Live llms.txt preview that uses saved settings and does not update the public cache.
Optional excerpts/descriptions in llms.txt. Description priority is: per-post LLM description, SEO meta description, explicit excerpt, then a generated content summary.
Per-post “Markdown override (LLM Friendly)” metabox for custom Markdown or Gutenberg block markup, plus a one-line llms.txt description field.
Optional site title, site description, and author overrides for generated metadata.
Same-site sitemap URL validation. External sitemap URLs are rejected unless a developer explicitly allows them with a filter.
AI crawler diagnostics with policy examples and documentation links for OAI-SearchBot, GPTBot, Googlebot/Search AI features, and Google-Extended. The plugin does not edit robots.txt automatically.
Hardened public export boundaries: attachments, drafts, private content, password-protected posts, and non-public/non-queryable post types are excluded by default.
KSES sanitization for users without unfiltered_html, length caps for custom Markdown fields, and developer filters for edge cases.

Requirements

WordPress 6.0+
PHP 7.4+

If requirements are not met, the plugin displays an admin notice and does not run.
Development
Run composer run lint to syntax-check the plugin PHP files.
Run composer run test to execute lightweight regression tests for Markdown conversion, llms.txt format, headers, and sanitization.
See TESTING.md for WordPress integration scenarios.
Developer Notes

llmf_can_export_post can deny a post for markdown, llms, or llms_search contexts.
llmf_exportable_post_type can explicitly opt in a public edge-case post type that is safe to expose even though WordPress marks it as not publicly queryable.
llmf_markdown_override_max_length changes the per-post Markdown override length cap. Default: 200000 characters; absolute maximum: 500000.
llmf_llms_description_max_length changes the per-post llms.txt description length cap. Default: 500 characters; absolute maximum: 2000.
llmf_markdown_metadata filters the JSON metadata array emitted at the top of each Markdown export.
llmf_markdown_cache_ttl changes the transient TTL for cached Markdown export bodies. Default: 3600 seconds.
llmf_llms_essential_links filters curated link items emitted in the llms.txt Essential section.
llmf_debug_headers_enabled enables diagnostic X-LLMF-* headers for llms.txt responses when returning true.
llmf_max_excluded_posts_per_type changes the per-post-type exclusion cap. Default: 500; absolute maximum: 5000.
llmf_allow_external_sitemap_url allows an external sitemap URL when returning true.
Users without unfiltered_html have custom Markdown sanitized with WordPress KSES. Heading markers are removed from the custom llms.txt notes block so user-provided notes cannot break the required llms.txt section order.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon