$allowed ) { $lines[] = 'User-agent: ' . $bot; $lines[] = $allowed ? 'Allow: /' : 'Disallow: /'; $lines[] = ''; } } // Hint to llms.txt for compatible AI crawlers. // // Deliberately a comment, not a `Sitemap:` directive: Sitemap expects an // XML sitemap or a plain list of URLs, and llms.txt is Markdown. Pointing // Sitemap at it makes conforming crawlers report a malformed sitemap and // can suppress the site's real sitemap. The canonical discovery routes for // llms.txt are the well-known path itself and the Link: rel="ai-context" // response header AEOMATIC_AI_Headers emits. $llms_enabled = AEOMATIC_Settings::get( 'llms_txt', 'enabled' ); if ( $llms_enabled ) { $lines[] = '# AI context file (llms.txt spec: https://llmstxt.org/)'; $lines[] = '# ' . home_url( '/llms.txt' ); $lines[] = ''; } return $output . "\n" . implode( "\n", $lines ); } }