=== MarkdownPress ===
Contributors: juditth
Tags: markdown, ai, llms, sitemap, bricks, elementor
Requires at least: 5.7
Tested up to: 6.7
Stable tag: 1.4.1
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Creates a clean Markdown mirror of your WordPress site for AI crawlers and LLM tools.

== Description ==

MarkdownPress automatically generates Markdown versions of all your WordPress content and serves them to AI crawlers and LLM tools.

= Features =

* Converts all published posts, pages, and custom post types to clean Markdown.
* Smart Serving: Detects Accept: text/markdown header and serves MD files automatically.
* LLM Ready: Generates llms.txt and llms-full.txt (following the /llms.txt standard).
* Fast Response: Uses .htaccess rewrite rules for ultra-fast direct serving (~2ms).
* Page Builder Support: Special handling for Bricks, Elementor, and other builders using HTTP fallback rendering.
* Batch Processing: Generates content in small batches via Cron to prevent server overload.
* SEO & Robot friendly: Adds X-Robots-Tag: noindex to all Markdown files.
* Auto-Update: Built-in support for self-hosted updates.

== Installation ==

1. Upload the plugin to the `/wp-content/plugins/` directory.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Go to **Settings > MarkdownPress** to configure your preferences.
4. Click **Generate Now** to build your first markdown mirror.

== Changelog ==

= 1.4.1 =
* Fixed Divi shortcodes leaking into llms.txt descriptions and YAML excerpts.
* Generate automatic excerpts from converted content, reusing cached Markdown and preserving manual excerpts.
* Regenerate Markdown files after updating to refresh existing excerpts and llms.txt.

= 1.4.0 =
* Added optional JSON-LD schema output for HTTP Fetch rendering.
* Filtered low-value BreadcrumbList schema from appended JSON-LD blocks.
* Hardened admin AJAX status access and cache path handling.
* Restricted sitemap imports to same-site URLs.

= 1.3.1 =
* Fixed browser encoding by routing ?format=markdown through PHP with explicit UTF-8 headers.
* Added UTF-8 normalization and Czech mojibake repair before writing generated Markdown files.
* Hardened repair for HTTP fetch bodies, summary exports, and llms files.

= 1.3.0 =
* Added separate default cache directories for each site in WordPress multisite.
* Added host-aware Apache rewrite rules so llms.txt and llms-full.txt are served from the matching site cache.

= 1.2.9 =
* Added Mioweb Base64 serialized content decoding as a fallback after normal HTML conversion.
* Extracted only visible builder copy from decoded Mioweb payloads to avoid style/config noise.

= 1.2.8 =
* Fixed fatal error when on-the-fly markdown generation runs before rewrite globals are available.
* Fixed on-demand markdown generation for taxonomy archive URLs requested with ?format=markdown.
* Prevented HTTP fallback from recursively requesting the markdown endpoint.

= 1.2.7 =
* Added integrated Error Log viewer to the admin dashboard.
* Added "Refresh" and "Clear logs" actions directly in the UI.
* Fixed progress bar visibility issues.

= 1.2.6 =
* Fixed PHP 8.4 fatal error (moved initialization to 'init' hook).
* Improved content extraction for WooCommerce and Bricks Builder.
* Added support for on-the-fly markdown generation for missed URLs.
* Fixed .htaccess path resolution and added detailed error logging.
* Updated settings UI with clearer descriptions for rendering methods.

= 1.2.5 =
* Fixed security issues (escaping, sanitization).
* Replaced direct PHP filesystem calls with WordPress alternatives.
* Consistent Text Domain usage.
* Added nonce verification for downloads.
* Removed duplicate settings link.

= 1.2.7 =
* Enhanced logging: Now records both successful (OK) and failed generations with detailed reasons and URLs.
* Improved Markdown conversion: Strict block-level separation for better headline rendering.
* New: Added "View Markdown" link to the WordPress Admin Bar for quick access.
* Encoding: Explicitly enforced UTF-8 charset in headers and .htaccess to fix special character issues.
* Admin UI: Added automatic log refreshing every 15 seconds and clearer method descriptions.
* Optimization: Re-implemented layout filtering to ensure cleaner content extraction.

= 1.2.5 =
* Forced absolute URLs for all images in Markdown output for better AI compatibility.

= 1.2.3 =
* Added "Stop Generation" button to halt active processing.
* Fixed button icon alignment in the admin interface.

= 1.2.2 =
* Added error logging system.
* Support for ZIP download of all Markdown files.
* UI improvements for the status dashboard.

= 1.0.0 =
* Initial release.
