=== Paradoks Markdown for AI ===
Contributors: codernite
Tags: markdown, ai, llm, llms-txt, woocommerce
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 8.0
Stable tag: 1.0.2
License: GPL-2.0+
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Serve markdown versions of WordPress posts and pages to AI agents through Accept headers, clean `.md` URLs, and discovery files such as `llms.txt`.

== Description ==

Paradoks Markdown for AI helps WordPress sites publish cleaner, lighter content to AI crawlers and retrieval systems without changing the public HTML experience for human visitors.

The plugin converts your rendered WordPress content to markdown, adds YAML frontmatter, caches the result, and serves it through multiple delivery channels that fit modern AI tooling.

= Core delivery features =

* Serve markdown when a client sends `Accept: text/markdown`
* Publish clean markdown URLs such as `/my-post.md`
* Generate `llms.txt` and optional `llms-full.txt`
* Add REST API `markdown` fields to enabled post types

= Content and conversion features =

* YAML frontmatter with title, URL, dates, author, excerpt, taxonomies, image, and language
* Optional Gutenberg-aware rendering for quotes, code blocks, galleries, and tables
* Relative URL rewriting for links and images
* Per-post controls for disabling markdown or overriding frontmatter
* Skips very short posts (under 15 words) so empty stubs are not exposed as markdown
* Lets you choose important pages for `llms.txt` automatically or with a custom page picker

= WooCommerce support =

* Detects products automatically and emits a dedicated `woocommerce` frontmatter block
* Includes price, regular and sale price with currency, SKU, stock status and quantity
* Adds weight, dimensions, attributes, and gallery image URLs when available
* Toggle product categories and product tags from the Content tab when products are enabled
* Excludes WooCommerce cart, checkout, account, and shop pages from `llms.txt` discovery output

= Performance and admin features =

* Post meta cache for generated markdown
* Save-time invalidation and optional scheduled cache warming
* Top-level admin menu with General, Content, Performance, and Advanced sections
* Inline confirmation when settings are saved
* Markdown preview tools in the editor and admin bar

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/` or install the generated release zip from the WordPress admin.
2. Activate **Paradoks Markdown for AI**. Default delivery channels turn on automatically — no extra setup is required for posts and pages.
3. Open **Markdown for AI** in the WordPress admin sidebar to fine-tune delivery, content scope, performance, and advanced options.

== Frequently Asked Questions ==

= Do I need Composer on the production site? =

No. End users should install the packaged release zip. Composer is only needed while developing the plugin from source.

= Which content types are exposed as markdown? =

Posts and pages are enabled by default. You can enable other public post types — including WooCommerce products — from the settings screen.

= Does it work with WooCommerce? =

Yes. When products are enabled in the Content tab, the generated markdown adds a `woocommerce` frontmatter block with price, SKU, stock, attributes, dimensions, and gallery URLs. Product categories and tags can be toggled independently from the Content tab.

= What happens when the `.md` feature is disabled? =

The plugin keeps markdown-specific rewrite requests from silently falling back to HTML, so stale `.md` routes do not leak the wrong response type.

= Can I preview the markdown before exposing it publicly? =

Yes. Published posts can be previewed from the post editor meta box, and editors also get an admin bar link to the live markdown URL when `.md` delivery is enabled.

== Screenshots ==

1. Modernized settings screen with delivery, content, performance, and advanced sections.
2. Post editor meta box with per-entry markdown controls and preview access.

== Changelog ==

= 1.0.2 =

* Security: Settings sanitize callback now verifies the `wpmai_settings_group-options` nonce and a `manage_options` capability before reading any `$_POST` payload, and runs every incoming field through a recursive sanitize pass before per-field validation.

= 1.0.1 =

* Bug fixes and improvements.

= 1.0.0 =

* Initial public release with markdown delivery, caching, `llms.txt`, REST fields, and modernized admin controls.

== Upgrade Notice ==

= 1.0.2 =

Hardens the settings save handler with an explicit nonce check, capability check, and recursive input sanitization.

= 1.0.1 =

Bug fixes and improvements.

= 1.0.0 =

First public release.
