=== WebDigit LLMs Index Suite ===
Contributors: webdigit
Tags: llms.txt, geo, ai-seo, json-ld, sitemap
Requires at least: 6.2
Tested up to: 6.8.2
Requires PHP: 8.1
Stable tag: 0.2.29
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Generate llms.txt, llms-full.txt, llms.json and AI-ready image indexes (Markdown + JSON-LD). Public URLs, REST API (ETag), cron and WP-CLI included. This plugin is not affiliated with llmstxt.org or Yoast; it merely supports the llms.txt pattern.

== Description ==

**WebDigit LLMs Index Suite** makes your WordPress site **GEO / AI-SEO ready** by publishing compact, machine-readable indexes for AI agents.

**Key features**
- **Synchronized trio**: `llms.txt`, `llms-full.txt`, **`llms.json`**
- **Image inventory**: `images.md` (Markdown table) + **`images.jsonld`** (`ImageObject`)
- **Public URLs**: `/llms.txt` (root) and `/llms/*` (virtual directory)
- **REST API with caching**: `GET /wp-json/wdlis/v1/index`, `GET /wp-json/wdlis/v1/images` (ETag + 304)
- **Automation**: cron every 6h + **WP-CLI** (`wp llms-suite regenerate`)
- **Controls**: include post types, exclude URL patterns, image MIME filters, customizable **license meta key**
- **Security**: Only published content is indexed (drafts, private posts excluded)
- **Developer hooks**: `wdlis_index_query_args`, `wdlis_index_entries`, `wdlis_images_query_args`, …

**Storage & exposure**
- Files are written to **`/wp-content/uploads/llms/`**.
- Public exposure is clean: **`/llms.txt`** (root) and **`/llms/<file>`** served via rewrite rules (no write needed at web root).

**Why this matters (GEO / AI-SEO)**
Generative engines and AI copilots prefer **clean, structured** sources. This plugin publishes a compact **text index** plus a **first-class image inventory** to help LLMs discover and summarize your content reliably.

> This plugin does **not** modify your existing robots.txt or sitemaps and does not call external APIs.

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/` (or clone it there).
2. Activate **LLMs.txt Suite** from **Plugins**.
3. Go to **Settings → LLMs.txt Suite** and click **Generate now**.
4. Verify public URLs:
   - `https://example.com/llms.txt`
   - `https://example.com/llms/llms-full.txt`
   - `https://example.com/llms/llms.json`
   - `https://example.com/llms/images.md`
   - `https://example.com/llms/images.jsonld`

== Frequently Asked Questions ==

= Where are files stored? =
In `/wp-content/uploads/llms/`. Public routes expose them at `/llms.txt` (root) and `/llms/*` (virtual directory).

= Does this plugin change robots.txt or XML sitemaps? =
No. It only reads public content and writes its own helper files. Your SEO stack remains unchanged.

= How do I include or exclude content? =
In **Settings**:
- Select **post types** to include.
- Add **exclude URL patterns** (one per line, e.g. `/tag/`, `/author/`).
- For images, pick **MIME types** and optionally exclude folders (e.g. `/cache/`, `/tmp/`).

= What about image licenses? =
Set the **License meta key** (default `license`). If present on an attachment, it will be surfaced in `images.md` and `images.jsonld`.

= Can I trigger generation via CLI or schedule it? =
Yes. Cron runs automatically every 6 hours. WP-CLI:
wp llms-suite regenerate [--only=index|images|all] [--force]


= Does it work on Multisite? =
Network install is supported; generation runs **per site**. (A network “super-index” is planned for a future version.)

= Does it phone home or collect data? =
No telemetry and no external requests. All processing happens locally.

== Screenshots ==

1. Dashboard with “Generate now” and quick links

== Developer Notes ==

**Filters**
/**
 * Adjust the WP_Query for index entries.
 */
apply_filters( 'wdlis_index_query_args', array $args ): array;

/**
 * Final pass on index entries before output.
 * Each entry: ['url' => string, 'title' => string, 'lastmod' => string]
 */
apply_filters( 'wdlis_index_entries', array $entries ): array;

/**
 * Adjust the WP_Query for image entries (attachments).
 */
apply_filters( 'wdlis_images_query_args', array $args ): array;

/**
 * Decide if a URL/file should be included after pattern checks.
 */
apply_filters( 'wdlis_index_url_should_include', bool $include, string $url, int $post_id, string $matched_pattern ): bool;
apply_filters( 'wdlis_images_should_include', bool $include, string $filepath, int $attachment_id, string $matched_pattern ): bool;

REST

GET /wp-json/wdlis/v1/index → JSON (with ETag headers)

GET /wp-json/wdlis/v1/images → JSON-LD ItemList (with ETag headers)

== Privacy ==

This plugin:

does not collect personal data,

does not transmit data to remote servers,

writes only static helper files to /wp-content/uploads/llms/.

Site owners are responsible for the accuracy of license metadata on images and for excluding private/PII content via settings.

== Changelog ==

= 0.1.0 =

MVP: llms.txt, llms-full.txt, llms.json, images.md, images.jsonld

Public URLs (/llms.txt, /llms/*), REST (ETag), cron (6h), WP-CLI

Options (include/exclude), developer hooks