Repository navigation
fix(llms): point llms.txt docs links at the current release - #737
Conversation
✅ Deploy Preview for cozystack ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
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. Comment |
Aleksei Sviridkin (lexfrei)
left a comment
There was a problem hiding this comment.
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:
- Add
static/llms.txtto thegit addline in both workflows (a small companion PR in cozystack/cozystack). - Drop step 6 and render llms.txt from a Hugo template that reads
.Site.Params.latest_version_id, the same valuelayouts/404.htmlandlayouts/docs/docs-landing.htmlalready 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.
4f0f7a4 to
b9b68d5
Compare
|
Aleksei Sviridkin (@lexfrei) Thanks, you're right: both workflows stage only
I also rebased on |
/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>
b9b68d5 to
244c228
Compare
## 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 -->
Aleksei Sviridkin (lexfrei)
left a comment
There was a problem hiding this comment.
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.
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:/docs/get-started//docs/v0/getting-started/(v0 alias)/docs/v1.6/getting-started//docs/components//docs/v0/applications/(v0 alias)/docs/v1.6/guides/platform-stack//docs/architecture//docs/v1.6/guides/concepts/The short
/docs/v1/...path is not an option here: onlylayouts/404.htmlredirects it, in JavaScript, after an HTTP 404. So llms.txt needs full version paths.To keep those paths current,
static/llms.txtbecomes the templatelayouts/home.llms.txt. It builds the three links fromparams.latest_version_id, the valuelayouts/404.htmlandlayouts/docs/docs-landing.htmlalready read.register_version.shupdates that value inhugo.yamlat release time, and the release workflows already commithugo.yaml, so no release step is needed. Each link is resolved withsite.GetPage, and the build fails witherrorfif the page is missing from the latest version.The
llmsoutput format (text/plain,baseName: llms) is defined inhugo.yamland enabled only for the English home page (languages.en.outputs), so no/de/llms.txt,/ru/llms.txtand 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.shpasses; no translated page goes stale, since no content file changes.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 withllms.txt: /docs/v9.9/getting-started does not exist; update the link in layouts/home.llms.txt, one error per link.HUGO_ENV=preview,-b <preview URL>): the links still point athttps://cozystack.io/docs/v1.6/..., and no per-language copies appear.content/en/docs/next/, so the next release keeps them.