Skip to main content
TB

How to implement llms.txt for your Laravel site?

Tom Barrett AI & Machine Learning 233 views
I noticed mejba.me has a /llms.txt endpoint and thought it was a great idea. For those who do not know, llms.txt is a way to provide context to AI crawlers about your site, similar to robots.txt but for LLMs. I want to implement something similar for my Laravel blog. My questions: 1. What information should go in llms.txt? 2. Should it be a static file or dynamically generated from your database? 3. Is there a standard format or specification to follow? 4. How do you handle it for sites with frequently changing content? Would appreciate any guidance from people who have implemented this.

1 Reply

Best Answer
EA
Engr Mejba Ahmed 4 months ago
Thanks for the interest Tom! Here is how I implemented it on mejba.me: 1. Dynamic route in routes/web.php pointing to a dedicated LlmsController. 2. Content includes: Site overview, available pages, content types, API information, and professional background. 3. Format: Plain text with clear sections and headers. 4. Two files: /llms.txt gives a summary and /llms-full.txt has the detailed version with all content. The idea is to give AI crawlers useful context about your site. Think of it like robots.txt but for LLMs. It tells them what your site is about and how to understand your content. I generate it dynamically so it stays in sync with actual site content. The controller pulls from models and settings so new blog posts and projects are automatically included.

Post a Reply

Engr Mejba Ahmed

Engr Mejba Ahmed

Claude Code Expert · Online

👋

Hey there!

Quick Actions

WhatsApp Instant reply

Chat on WhatsApp

+880 1723 741224 · Instant reply

Popular Questions

Engr Mejba Ahmed is connected
Engr Mejba Ahmed is typing...
Engr Mejba Ahmed avatar

✉ Want me to follow up? Drop your email

Engr Mejba Ahmed avatar

📞 Connect Directly

Choose how you'd like to reach me

WhatsApp

+880 1723 741224

Email

[email protected]

✓ Details sent! I'll get back to you shortly.

Powered by OpenAI

335+

Blog Posts

25

AI Courses

63

Projects

Services & Expertise

Pricing & Process

Learning & Resources

Connect & Support