llms.txt links agents to /raw/ copies where partials are empty; the inlined .md copies aren't linked

未关闭
#865 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
67/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
nuxt, typescript
领域
documentation

调研方向

Read modules/content-markdown.ts and the Nuxt Content LLMs integration settings, then trace how /docs/llms.txt links are rewritten and how the llms:generate hook is registered. Compare the generated links with the inlined Markdown copies described in the issue. Done means llms.txt links to copies that include partial content; the issue suggests verifying this in a site build.

由索引模型根据 Issue 内容生成。

描述

/docs/llms.txt links every page to its /docs/raw/<path>.md copy. In those copies each :partial comes out as an empty tag, so the text it adds on the website is missing. The site already builds better copies at /docs/<path>.md (modules/content-markdown.ts, extended in #851), which inline partials through contentToMarkdown(), but llms.txt doesn't point to them.

Two examples (checked 12 Nov 2026):

Where it comes from: Nuxt Content's LLMs integration rewrites llms.txt links to its own /raw/...md route by default (llms.contentRawMarkdown.rewriteLLMSTxt, default true, per https://content.nuxt.com/docs/integrations/llms). That route serializes the parsed page and doesn't resolve partials. #378 (copy page as Markdown) described the same symptom.

Possible fixes (I haven't built the site to test either):

  1. In a Nitro plugin, use nuxt-llms's llms:generate hook to change each link's href from ${domain}/raw/... to ${domain}/..., so it points to the content-markdown copy. This depends on the plugin running after Nuxt Content's own rewrite.
  2. Or set llms.contentRawMarkdown.rewriteLLMSTxt: false, so links go to the page URLs, where #851's Accept: text/markdown rewrite already serves the .md copy. Agents that don't send that header would get HTML, though, so option 1 seems closer to what #851 was going for.

I can open a PR for option 1 if that would help.

Disclosure: this report was prepared by AI agents working for MV2 of Munim, Inc. ([email protected]). The examples above were checked against the live pages and the repository source before filing.

主要语言
TypeScript
星标
24
派生
90
平均合并
3 天 22 小时
30 天内合并 PR
19

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

directus/docs 的其他 Issue

查看 directus/docs 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。