[WordPress] 外掛分享: Umay AI Markdown

首頁外掛目錄 › Umay AI Markdown
WordPress 外掛 Umay AI Markdown 的封面圖片
全新外掛
安裝啟用
尚無評分
7 天前
最後更新
問題解決
WordPress 6.0+ PHP 7.4+ v1.1.1 上架:2026-05-06

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.1.1) 或搜尋安裝

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

原文外掛簡介

Modern AI agents (ChatGPT, Claude, Perplexity, Gemini, etc.) work much better with Markdown than HTML. Umay AI Markdown inspects the incoming Accept header and, only when text/markdown is requested, intercepts the response and serves a clean, agent-friendly Markdown representation of the page.
Browsers, search engines, and any client that does not explicitly ask for Markdown receive the unchanged HTML response. There is no settings page, no cron job, and no external service call.
Key features

Zero configuration — install, activate, done.
Only triggers when Accept: text/markdown is present. Regular visitors and search engines are never affected.
Hybrid content extraction: uses the_content for posts/pages, falls back to a DOM-based extractor for archives, taxonomies, and the homepage.
Powered by the industry-standard league/html-to-markdown library.
Transient-cached for 12 hours per URL (sha256-keyed). Auto-invalidated on save_post, term edits, theme switches, and menu updates.
Built-in IP rate limiter (30 requests / minute by default) to mitigate abuse.
Strict input sanitization, header injection protection, libxml entity hardening (XXE-safe), and full WordPress Coding Standards compliance.
PSR-4 autoloaded, namespaced OOP code. No globals.
Sends Vary: Accept, X-Robots-Tag: noindex, and X-Content-Type-Options: nosniff on every Markdown response.

What gets sent to AI agents
Each Markdown response includes a YAML front-matter block with the page title, site name, canonical URL, and ISO-8601 generation timestamp, followed by the page body converted to Markdown. Navigation, footer, sidebars, scripts, styles, comment forms, related posts, and other page chrome are stripped before conversion.
Filters
Two filters are available for advanced customization:

umay_mdn_bypass — Return true to skip Markdown handling for the current request.
umay_mdn_cache_ttl — Override the default 12-hour cache lifetime (in seconds, minimum 60).
umay_mdn_rate_limit — Override the default 30-requests-per-minute rate limit.
umay_mdn_converter_options — Modify the league/html-to-markdown converter options array.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon