mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-07 17:36:22 +08:00
Adds the ability to serve a custom llms.txt file at /llms.txt, allowing site admins to provide information for LLM crawlers about the site's structure and important content. The implementation uses a new `llms_txt` upload site setting where admins can upload a .txt or .md file (max 512KB). The file is served via the StaticController, following the same pattern as favicon. For external storage (S3), the content is cached in Redis using the upload's SHA1 as the cache key - this means the cache automatically invalidates when a new file is uploaded. For local storage, the file is served directly via send_file. Blocked crawlers are allowed to access /llms.txt, similar to robots.txt. Ref - t/162690 Requires - https://github.com/discourse/discourse/pull/36939 |
||
|---|---|---|
| .. | ||
| anonymous_cache.rb | ||
| crawler_hooks.rb | ||
| csp_script_nonce_injector.rb | ||
| default_headers.rb | ||
| discourse_public_exceptions.rb | ||
| enforce_hostname.rb | ||
| missing_avatars.rb | ||
| omniauth_bypass_middleware.rb | ||
| overload_protections.rb | ||
| processing_request.rb | ||
| request_tracker.rb | ||