From 9c85c08c3f753fbced7afa019d1276adb783e10f Mon Sep 17 00:00:00 2001 From: Joshua Blum Date: Mon, 31 Aug 2026 19:28:58 +0200 Subject: [PATCH 01/38] Add tab for llms.txt to Crawling & AI section --- resources/js/pages/robots/Edit.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/resources/js/pages/robots/Edit.vue b/resources/js/pages/robots/Edit.vue index 84f79a28..2fd93a61 100644 --- a/resources/js/pages/robots/Edit.vue +++ b/resources/js/pages/robots/Edit.vue @@ -274,6 +274,7 @@ onUnmounted(() => { + @@ -466,6 +467,10 @@ onUnmounted(() => { /> + + +
+
From d3ae8463f4fea7450637267a011d577d5353a186 Mon Sep 17 00:00:00 2001 From: Joshua Blum Date: Tue, 1 Sep 2026 18:23:31 +0200 Subject: [PATCH 02/38] Add initial feature implementation --- lang/en/messages.php | 47 ++ resources/js/pages/llms/Tab.vue | 356 +++++++++++++ resources/js/pages/robots/Edit.vue | 20 +- routes/cp.php | 5 + routes/web.php | 7 + src/Cascade.php | 11 + src/Events/LlmsTxtGenerated.php | 24 + src/Http/Controllers/CP/LlmsController.php | 179 +++++++ src/Http/Controllers/CP/RobotsController.php | 1 + src/Http/Controllers/LlmsController.php | 46 ++ src/Llms/Llms.php | 216 ++++++++ src/Llms/LlmsDocument.php | 18 + src/Llms/LlmsRenderCache.php | 49 ++ src/Llms/LlmsRenderer.php | 202 ++++++++ src/Llms/LlmsTxtGenerator.php | 502 +++++++++++++++++++ src/ServiceProvider.php | 15 + 16 files changed, 1695 insertions(+), 3 deletions(-) create mode 100644 resources/js/pages/llms/Tab.vue create mode 100644 src/Events/LlmsTxtGenerated.php create mode 100644 src/Http/Controllers/CP/LlmsController.php create mode 100644 src/Http/Controllers/LlmsController.php create mode 100644 src/Llms/Llms.php create mode 100644 src/Llms/LlmsDocument.php create mode 100644 src/Llms/LlmsRenderCache.php create mode 100644 src/Llms/LlmsRenderer.php create mode 100644 src/Llms/LlmsTxtGenerator.php diff --git a/lang/en/messages.php b/lang/en/messages.php index 51174ce9..5a4f7d7f 100644 --- a/lang/en/messages.php +++ b/lang/en/messages.php @@ -7,6 +7,53 @@ 'robots_description' => 'Manage robots.txt, AI crawler access, content-use preferences, and sitemap discovery.', 'edit_robots' => 'Edit robots.txt settings', 'robots_txt_generated' => 'robots.txt generated', + 'llms_txt_generated' => 'llms.txt generated', + 'llms_txt' => [ + 'unable_to_load_settings' => 'Unable to load llms.txt settings', + 'unable_to_save_settings' => 'Unable to save llms.txt settings', + 'unable_to_save_settings_writable' => 'Unable to save llms.txt settings. Make sure the addon settings and managed file are writable.', + 'unable_to_generate' => 'Unable to generate llms.txt', + 'already_up_to_date' => 'llms.txt is already up to date', + 'managed' => 'Managed', + 'custom_source' => 'Custom source', + 'view_live_file' => 'View live file', + 'existing_file_unmanaged' => 'An existing llms.txt file is not managed by SEO Pro', + 'existing_file_unmanaged_description' => 'SEO Pro will not overwrite or remove this file. It may take precedence over the cached llms.txt route.', + 'disabled' => 'llms.txt is disabled', + 'disabled_description' => 'Enable it to publish the cached route. The feature is opt-in and returns a 404 while disabled.', + 'needs_generation' => 'The physical llms.txt file needs to be generated', + 'needs_generation_description' => 'The current environment or saved settings differ from the managed physical file.', + 'managed_by_seo_pro' => 'The physical llms.txt file is managed by SEO Pro', + 'cached_route_active' => 'The cached llms.txt route is active', + 'cached_route_active_description' => 'No physical file exists. Generate one if this deployment should serve or commit a static file.', + 'enable' => 'Enable llms.txt', + 'enable_description' => 'Publish a curated Markdown guide for language models and agents.', + 'editing_mode' => 'Editing mode', + 'editing_mode_instructions' => 'Managed mode builds a validated document. Custom source mode gives you complete Markdown control.', + 'title' => 'Site or project name', + 'title_instructions' => 'Required when enabled. Antlers is supported, for example {{ config:app:name }}.', + 'summary' => 'Short summary', + 'summary_instructions' => 'Optional. Rendered as the introductory blockquote.', + 'details' => 'Additional context', + 'details_instructions' => 'Optional Markdown placed before the file lists. Use sections below instead of headings here.', + 'sections' => 'File-list sections', + 'sections_description' => 'Add curated links to useful, preferably LLM-friendly resources.', + 'add_section' => 'Add section', + 'section_title' => 'Section title', + 'link_title' => 'Link title', + 'link_url' => 'Absolute URL', + 'link_description' => 'Description (optional)', + 'add_link' => 'Add link', + 'custom_source_heading' => 'Custom llms.txt source', + 'custom_source_description' => 'Antlers is parsed before validation. When enabled, the resolved document must begin with a non-empty H1.', + 'generated_preview' => 'Resolved preview', + 'preview_unavailable' => 'Preview unavailable', + 'preview_title' => 'llms.txt preview', + 'generate_confirmation' => 'Generate llms.txt?', + 'generate_confirmation_description' => 'SEO Pro will create a missing file or update a file it already manages. An unmanaged file will never be overwritten.', + 'custom_source_too_large' => 'The custom source must not be greater than 500 KiB.', + 'custom_source_invalid_utf8' => 'The custom source must be valid UTF-8.', + ], 'robots_txt' => [ 'unable_to_save_settings' => 'Unable to save robots.txt settings', 'unable_to_save_settings_writable' => 'Unable to save robots.txt settings. Make sure the addon settings are writable.', diff --git a/resources/js/pages/llms/Tab.vue b/resources/js/pages/llms/Tab.vue new file mode 100644 index 00000000..3ad96ba5 --- /dev/null +++ b/resources/js/pages/llms/Tab.vue @@ -0,0 +1,356 @@ + + +