Skip to content

llms.txt: API entries link bare endpoints that return 400 as linked #45452

Description

@portdeveloper

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/llms.txt (the "How to use" API section)

What part(s) of the article would you like to see updated?

hey! the three API entries in llms.txt link the bare endpoints, which return HTTP 400 as linked:

$ curl -so /dev/null -w "%{http_code}\n" https://docs.github.com/api/article/body
400
$ curl -so /dev/null -w "%{http_code}\n" "https://docs.github.com/api/article/body?pathname=/en/get-started/start-your-journey/what-is-github"
200

same for /api/article and /api/search/v1. the descriptions already contain working parameterized curl examples, so a careful reader is fine, but the llms.txt convention is that the markdown link href itself is fetchable, and plenty of agents follow the href without parsing the description. suggestion: make the link hrefs the parameterized example URLs (keeping the descriptions as they are), so naive agents get a 200 with real content instead of a 400. the other 114 links in the file all serve correctly.

Additional information

found while testing llms-txt-check, a checker that validates deployed llms.txt files (npx llms-txt-check https://docs.github.com reproduces this). for context, i maintain docusaurus-plugin-copy-page-button (runs on 28 docs sites) so i spend a lot of time in this corner of docs tooling. happy to PR the change if useful!

Metadata

Metadata

Assignees

No one assigned

    Labels

    triageDo not begin working on this issue until triaged by the team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions