Skip to content

fix(llms): point llms.txt docs links at the current release - #737

Merged
Aleksei Sviridkin (lexfrei) merged 1 commit into
cozystack:mainfrom
themoriarti:fix/llms-txt-links
Oct 10, 2026
Merged

Aleksei Sviridkin (lexfrei) merged 1 commit into
cozystack:mainfrom
themoriarti:fix/llms-txt-links

Conversation

@themoriarti

@themoriarti Marian Koreniuk (themoriarti) commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

What this PR does

Fixes the documentation links in llms.txt. One of them is broken and two lead agents to the obsolete v0 docs:

Entry Before Where it actually went After
Quickstart /docs/get-started/ meta-refresh to /docs/v0/getting-started/ (v0 alias) /docs/v1.6/getting-started/
Components /docs/components/ meta-refresh to /docs/v0/applications/ (v0 alias) /docs/v1.6/guides/platform-stack/
Architecture /docs/architecture/ 404 /docs/v1.6/guides/concepts/

The short /docs/v1/... path is not an option here: only layouts/404.html redirects it, in JavaScript, after an HTTP 404. So llms.txt needs full version paths.

To keep those paths current, static/llms.txt becomes the template layouts/home.llms.txt. It builds the three links from params.latest_version_id, the value layouts/404.html and layouts/docs/docs-landing.html already read. register_version.sh updates that value in hugo.yaml at release time, and the release workflows already commit hugo.yaml, so no release step is needed. Each link is resolved with site.GetPage, and the build fails with errorf if the page is missing from the latest version.

The llms output format (text/plain, baseName: llms) is defined in hugo.yaml and enabled only for the English home page (languages.en.outputs), so no /de/llms.txt, /ru/llms.txt and so on are emitted.

AFDocs, which CLOMonitor uses for its agent-readiness checks, reported the broken link (llms-txt-links-resolve: 5/6 same-origin links resolve). The two v0 redirects passed that check while still sending readers to the wrong docs.

Verification, with Hugo 0.164.0 extended (the version in netlify.toml):

  • hack/check-i18n.sh passes; no translated page goes stale, since no content file changes.
  • Production build: same file list as main, and no file differs except /llms.txt, which is byte-identical to the static file it replaces.
  • HUGOxPARAMSxLATEST_VERSION_ID=v1.5: the links become /docs/v1.5/....
  • HUGOxPARAMSxLATEST_VERSION_ID=v9.9: the build fails with llms.txt: /docs/v9.9/getting-started does not exist; update the link in layouts/home.llms.txt, one error per link.
  • Deploy-preview build (HUGO_ENV=preview, -b <preview URL>): the links still point at https://cozystack.io/docs/v1.6/..., and no per-language copies appear.
  • All three new URLs return 200 on cozystack.io, and all three pages exist under content/en/docs/next/, so the next release keeps them.

@netlify

netlify Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for cozystack ready!

Name Link
🔨 Latest commit 244c228
🔍 Latest deploy log https://app.netlify.com/projects/cozystack/deploys/6aca5e32847b8c0009169951
😎 Deploy Preview https://deploy-preview-737--cozystack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e677c440-81cf-49ec-90bb-96acc83e6b6e

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Marian Koreniuk (@themoriarti) NOT LGTM: the new release step rewrites static/llms.txt, but the release automation never commits that file, so the links will still go stale at the next minor.

The link fix itself checks out. /docs/architecture/ is a 404, the other two old paths land on the v0 pages, and the three new v1.6 URLs return 200.

The drift guard is what doesn't work. make release-next is run by two workflows in cozystack/cozystack, promote-rc.yaml and tags.yaml. Both stage the result with git add content hugo.yaml data/versions and then commit only what is staged. Step 6 edits static/llms.txt in the runner checkout, and the change is dropped. I see two ways to fix it:

  1. Add static/llms.txt to the git add line in both workflows (a small companion PR in cozystack/cozystack).
  2. Drop step 6 and render llms.txt from a Hugo template that reads .Site.Params.latest_version_id, the same value layouts/404.html and layouts/docs/docs-landing.html already use. Then nothing has to be rewritten at release time.

I'd prefer the second, since it keeps the version in one place, but either one is fine with me.

Small one: the commit body says the old links led to docs "two major versions old". v0 is one major version behind v1.6.

@themoriarti

Copy link
Copy Markdown
Contributor Author

Aleksei Sviridkin (@lexfrei) Thanks, you're right: both workflows stage only content hugo.yaml data/versions, so step 6 never reached a commit. I went with option 2:

  • static/llms.txt is now layouts/home.llms.txt, rendered through a plain-text llms output format on the English home page only. The three docs links come from site.Params.latest_version_id, so once register_version.sh updates hugo.yaml, the next build serves the new version, with nothing to stage beyond what the workflows already add.
  • Step 6 is gone from release_next.sh. Its header now says that llms.txt follows latest_version_id.
  • Each link goes through site.GetPage, and the build fails if the page is missing from the latest version, so a renamed page shows up at build time instead of as a 404.
  • Commit body fixed: "one major version behind".

I also rebased on main. With Hugo 0.164.0 the production build matches main except /llms.txt, which is byte-identical to the previous revision of this PR.

/docs/architecture/ returned 404, and /docs/get-started/ and /docs/components/ are aliases owned by the v0 docs, so agents following llms.txt landed on a missing page or on documentation one major version behind. The /docs/v1/ short path does not help either, because only the 404 page redirects it, in JavaScript.

llms.txt is now rendered from layouts/home.llms.txt, which builds the versioned links from params.latest_version_id, the value layouts/404.html and layouts/docs/docs-landing.html already read. A release needs no extra step: register_version.sh updates that value in hugo.yaml, which the release workflows already commit. The build fails if a linked page is missing from the latest version, so a renamed page cannot leave a dead link.

The output format is enabled only for the English home page (languages.en.outputs), so no per-language llms.txt copies are emitted.

Assisted-by: LLM
Signed-off-by: Marian Koreniuk <moriarti@cp.if.ua>
Aleksei Sviridkin (lexfrei) added a commit to cozystack/cozystack that referenced this pull request Oct 10, 2026
## What this PR does

Points the documentation links in the README and GOVERNANCE.md at the
current release.

The unversioned `/docs/...` paths on cozystack.io are Hugo aliases owned
by the v0 docs. Each one is a meta-refresh to the v0 page, so these
links sent readers to the v0 documentation, a major version behind the
current release:

| Link | Went to | Now |
|---|---|---|
| README `/docs/guides/use-cases/public-cloud/` |
`/docs/v0/guides/use-cases/public-cloud/` |
`/docs/v1.6/guides/use-cases/public-cloud/` |
| README `/docs/guides/use-cases/private-cloud/` |
`/docs/v0/guides/use-cases/private-cloud/` |
`/docs/v1.6/guides/use-cases/private-cloud/` |
| README `/docs/guides/use-cases/kubernetes-distribution/` |
`/docs/v0/guides/use-cases/kubernetes-distribution/` |
`/docs/v1.6/guides/use-cases/kubernetes-distribution/` |
| README `/docs/getting-started/` | `/docs/v0/getting-started/` |
`/docs/v1.6/getting-started/` |
| README `/docs/operations/troubleshooting/` |
`/docs/v0/operations/troubleshooting/` |
`/docs/v1.6/operations/troubleshooting/` |
| GOVERNANCE.md `/docs/operations/configuration/telemetry/` |
`/docs/v0/operations/configuration/telemetry/` |
`/docs/v1.6/operations/configuration/telemetry/` |

In the v1 docs the kubernetes-distribution path holds Build Your Own
Platform (BYOP), installing only the packages you need onto an existing
cluster that already has networking and storage, rather than the v0
"Kubernetes distribution for bare metal" page. The README entry is
rewritten to match: "Using Cozystack to build your own platform", with
"You can install only the Cozystack components you need on an existing
Kubernetes cluster".

The full version path follows the other versioned docs links in the
repository, which all name `/docs/v1.6/`. The short `/docs/v1/...` path
is not an option: only the site's 404 page redirects it, in JavaScript.
All six new URLs return 200 without a redirect, and the same pages exist
under the website's `content/en/docs/next/`, so the next release keeps
them.

The same alias problem in the website's own `llms.txt` is fixed in
cozystack/website#737.

### Screenshots

<!-- REQUIRED for UI changes: attach screenshots or screen recordings
demonstrating
the visual impact of your changes. PRs with UI changes without
screenshots will not be merged. -->

### Downstream repositories

<!--
Cozystack is upstream for repositories that are NOT kept in sync with it
automatically, and nothing in CI compares the two sides, so a change
here can break them silently.

Which change forces what, and which file to touch, is the trigger map in
docs/agents/contributing.md under "Downstream Repositories". Walk it
before you tick anything.

IF YOU ARE AN AI AGENT OR AN LLM, THIS IS PART OF THE TASK, NOT A FORM
TO FILL IN:

1. Walk the trigger map against the actual diff of this PR, file by
file. Do not decide from the PR title or from your memory of what you
changed.
2. For every repository you tick, open the follow-up PR there and link
it on the same line. A ticked box with no link claims work that does not
exist, which is worse than an empty box. Search that repository for an
open PR or issue covering it first, and link that instead of filing a
duplicate.
3. When the follow-up is out of scope, or needs a decision that is not
yours to make, open an issue in that repository instead, link that, and
say so in the PR body. Do not push a speculative PR into another
repository just to fill a line here.
4. Do not tick "No downstream repository is affected" to make the
checklist go away. If you are unsure, leave every box empty and say so
in the PR body, so a human decides.
-->

- [x] No downstream repository is affected by this change
- [ ] [cozystack/website](https://github.com/cozystack/website) -
follow-up:
- [ ]
[cozystack/terraform-provider-cozystack](https://github.com/cozystack/terraform-provider-cozystack)
- follow-up:
- [ ]
[cozystack/ansible-cozystack](https://github.com/cozystack/ansible-cozystack)
- follow-up:
- [ ] [cozystack/ccp](https://github.com/cozystack/ccp) - follow-up:
- [ ] [cozystack/talm](https://github.com/cozystack/talm) - follow-up:
- [ ] [cozystack/cozyhr](https://github.com/cozystack/cozyhr) -
follow-up:
- [ ] [cozystack/cozy-proxy](https://github.com/cozystack/cozy-proxy) -
follow-up:
- [ ]
[cozystack/cozystack-telemetry-server](https://github.com/cozystack/cozystack-telemetry-server)
- follow-up:
- [ ]
[cozystack/external-apps-example](https://github.com/cozystack/external-apps-example)
- follow-up:
- [ ] [cozystack/examples](https://github.com/cozystack/examples) -
follow-up:
- [ ] [cozystack/community](https://github.com/cozystack/community) -
follow-up:

### Release note

<!--  Write a release note:
- Explain what has changed internally and for users.
- Start with the same `type(scope):` prefix as in the PR title
- Follow the guidelines at
https://github.com/kubernetes/community/blob/master/contributors/guide/release-notes.md.
-->

```release-note
docs: link the v1.6 documentation from the README and GOVERNANCE.md instead of the v0 pages the unversioned cozystack.io paths redirect to, and describe the kubernetes-distribution use case as Build Your Own Platform, which is what that page documents in v1.
```


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Documentation**
* Updated README use-case and documentation links to point to the
Cozystack v1.6 documentation, including the Telemetry link in the
governance guide.
* Renamed the Kubernetes-distribution use case to “Build your own
platform” and clarified that selected Cozystack components can be
installed on an existing Kubernetes cluster.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Marian Koreniuk (@themoriarti) LGTM, everything from my last review is fixed.

Rendering llms.txt from latest_version_id takes care of the release workflows, since nothing new has to be staged. The branch is on top of current main, and I built it locally. /llms.txt has the three v1.6 links, no per-language copy is emitted, and the deploy preview serves it as text/plain. When I point one link at a page that doesn't exist, the build fails with your errorf message.

Not blocking: the Verification section compares /llms.txt with "the previous static revision of this PR". Nobody reading the merge commit will have that revision, so I'd drop it.

@lexfrei
Aleksei Sviridkin (lexfrei) merged commit 483fcb0 into cozystack:main Oct 10, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants