llms.txt - links are incorrect #2225

Closed
opened 2026-03-13 09:35:45 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @pattobrien on GitHub (Oct 28, 2025).

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

Below is an example link in the generated https://www.better-auth.com/llms.txt file:

/llms.txt/docs/adapters/community-adapters.md

This doesn't point anywhere, and is wrong.

Two things need to be fixed:

  1. Each of the generated pages end in ".mdx" - (e.g. https://www.better-auth.com/docs/adapters/drizzle.mdx ), so all of the generated URLs need to change from .mdx -> .md.
  2. The generated llms.txt links need to remove the "/llms.txt" prefix ( /llms.txt/docs/adapters/community-adapters.md -> /docs/adapters/community-adapters.md )

Current vs. Expected behavior

See above

What version of Better Auth are you using?

n/a

System info

n/a

Which area(s) are affected? (Select all that apply)

Documentation

Auth config (if applicable)

import { betterAuth } from "better-auth"
export const auth = betterAuth({
  emailAndPassword: {  
    enabled: true
  },
});

Additional context

No response

Originally created by @pattobrien on GitHub (Oct 28, 2025). ### Is this suited for github? - [ ] Yes, this is suited for github ### To Reproduce Below is an example link in the generated https://www.better-auth.com/llms.txt file: [/llms.txt/docs/adapters/community-adapters.md](https://www.better-auth.com/llms.txt/docs/adapters/community-adapters.md) This doesn't point anywhere, and is wrong. Two things need to be fixed: 1. Each of the generated pages end in ".mdx" - (e.g. https://www.better-auth.com/docs/adapters/drizzle.mdx ), so all of the generated URLs need to change from `.mdx` -> `.md`. 2. The generated `llms.txt` links need to remove the "/llms.txt" prefix ( /llms.txt/docs/adapters/community-adapters.md -> /docs/adapters/community-adapters.md ) ### Current vs. Expected behavior See above ### What version of Better Auth are you using? n/a ### System info ```bash n/a ``` ### Which area(s) are affected? (Select all that apply) Documentation ### Auth config (if applicable) ```typescript import { betterAuth } from "better-auth" export const auth = betterAuth({ emailAndPassword: { enabled: true }, }); ``` ### Additional context _No response_
GiteaMirror added the documentation label 2026-03-13 09:35:45 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Oct 28, 2025):

This is a valid and actionable issue—it's already been recognized by maintainers and tracked in a recent GitHub issue and PR. The root cause was in the docs export logic, which previously generated links with the wrong prefix (/llms.txt) and sometimes the wrong extension (.mdx instead of .md). These problems have been addressed in a recent merged PR, which:

  • Normalizes all generated links to use the .md extension.
  • Removes the /llms.txt prefix from the links, so they now point to /docs/... as expected.
  • Cleans up the table of contents and per-page markdown for easier consumption by LLMs and users.

You can see the details and code changes in PR #5605, which specifically fixes the link formatting and structure in llms.txt. If you're still seeing broken links, make sure you're viewing the latest deployed version after this PR was merged.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

@dosubot[bot] commented on GitHub (Oct 28, 2025): <!-- Answer --> This is a valid and actionable issue—it's already been recognized by maintainers and tracked in a recent GitHub issue and PR. The root cause was in the docs export logic, which previously generated links with the wrong prefix (`/llms.txt`) and sometimes the wrong extension (`.mdx` instead of `.md`). These problems have been addressed in a recent merged PR, which: - Normalizes all generated links to use the `.md` extension. - Removes the `/llms.txt` prefix from the links, so they now point to `/docs/...` as expected. - Cleans up the table of contents and per-page markdown for easier consumption by LLMs and users. You can see the details and code changes in [PR #5605](https://github.com/better-auth/better-auth/pull/5605), which specifically fixes the link formatting and structure in `llms.txt`. If you're still seeing broken links, make sure you're viewing the latest deployed version after this PR was merged. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/ec4f7fa2-fc12-4f6d-a230-94940ba0dc38?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/ec4f7fa2-fc12-4f6d-a230-94940ba0dc38?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/ec4f7fa2-fc12-4f6d-a230-94940ba0dc38?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/ec4f7fa2-fc12-4f6d-a230-94940ba0dc38?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/ec4f7fa2-fc12-4f6d-a230-94940ba0dc38?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/ec4f7fa2-fc12-4f6d-a230-94940ba0dc38?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/ec4f7fa2-fc12-4f6d-a230-94940ba0dc38?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/cdda13d9-dd27-4d31-b09a-5d8bec92de21/ask?utm_source=github)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/better-auth/better-auth/issues/5640)
Author
Owner

@bytaesu commented on GitHub (Oct 28, 2025):

Hello @pattobrien,

The links are correct. However, some old code I didn’t touch in my previous PR was causing a runtime error.

It didn’t appear in my local production build, and I couldn’t catch it earlier because I didn’t yet have access to Vercel preview. The changes have now been fully tested in the deployed version, and the issue will be completely resolved today.

Thanks for pointing it out so clearly.


https://github.com/user-attachments/assets/71269d33-06fa-4ef1-b7b7-37c93dae5b10

@bytaesu commented on GitHub (Oct 28, 2025): Hello @pattobrien, The links are correct. However, some old code I didn’t touch in my previous PR was causing a runtime error. It didn’t appear in my local production build, and I couldn’t catch it earlier because I didn’t yet have access to Vercel preview. The changes have now been fully tested in the deployed version, and the issue will be completely resolved today. Thanks for pointing it out so clearly. --- https://github.com/user-attachments/assets/71269d33-06fa-4ef1-b7b7-37c93dae5b10
Author
Owner

@pattobrien commented on GitHub (Oct 28, 2025):

@bytaesu ahh I see! the changes havent been propogated I guess.. I'll look out for them today!

Thanks a lot for the quick response and fixes :)

@pattobrien commented on GitHub (Oct 28, 2025): @bytaesu ahh I see! the changes havent been propogated I guess.. I'll look out for them today! Thanks a lot for the quick response and fixes :)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#2225