Skip to content

feat(guides): merge every product repo's guides into the Guides tab - #131

Merged
NathanFlurry merged 1 commit into
mainfrom
feat/merged-guides
Oct 8, 2026
Merged

NathanFlurry merged 1 commit into
mainfrom
feat/merged-guides

Conversation

@NathanFlurry

Copy link
Copy Markdown
Member

Until now the Guides tab only read the Actors bundle's learn section plus four website-owned guides. Any product repo can now ship guides, and they keep their own examples.

Convention

<repo>/<bundle>/content/guides/<slug>.mdx   -> /guides/<slug>/
<repo>/<bundle>/sidebar.json  "guides": [ { "title", "pages" } ]

Bundles link guides as /guides/<slug>, so nothing is re-rooted. <CodeSnippet> paths already resolve against the repo that owns the MDX file, so an Agents guide embeds rivet-dev/agents examples, and its edit and source links point there.

Sidebar merge

The sidebar starts with the website's Overview group. Then come every bundle's guides groups, in PRODUCTS order. Groups with the same title merge at the position where the title first appears, keeping each bundle's page order. With rivet-dev/rivet#5853 and rivet-dev/agents#348, the result is: General, Guides, Solutions, Architecture (Actors), then Agents (Sign in with ChatGPT).

Changes

  • src/sitemap/guides.ts: GUIDE_BUNDLES and content-id helpers replace ACTORS_LEARN_CONTENT_PREFIX, rerootLearnHref, and SITE_GUIDES.
  • src/sitemap/products.ts: guidesSidebar() merges the groups. The raw sidebar JSON is cast through unknown, because icons are still names before hydration.
  • src/pages/guides/[...slug].astro: routes <bundle>/guides/*, builds edit URLs from the owning repo, and throws when two bundles define the same slug.
  • src/metadata/*: a bundle's own guides/index.mdx never publishes, and the SITE_GUIDES loop is removed.
  • scripts/check-sitemap.ts: the sidebar and content directories must agree per bundle, and duplicate slugs fail the check.
  • redirects.mjs: /actors/learn/* redirects read the renamed folder.
  • The four website-owned guides moved to the Actors bundle. vendor/actors carries docs(actors): rename the learn section to guides and move the website's Actors guides in rivet#5853 exactly, so this PR builds on its own.
  • Updated CLAUDE.md, HIDDEN.md, and DARK_MODE_ASSETS.md.

Verified locally

  • pnpm check:sitemap passes. Adding a duplicate chat-room guide to the agents bundle fails it with /guides/chat-room/ is defined by more than one bundle: actors, agents.
  • pnpm build (642 pages) and pnpm check:seo pass.
  • /guides/ lists 13 cards, /guides/sign-in-with-chatgpt/ renders agents snippets, and /actors/learn/chat-room returns 301 to /guides/chat-room/.
  • tsc reports no errors in the changed files (188 pre-existing errors elsewhere, down from 190).

Merge order

  1. This PR.
  2. docs(actors): rename the learn section to guides and move the website's Actors guides in rivet#5853. Its docs-sync PR here should have no diff.
  3. docs(agents): add the Extensions page and the Sign in with ChatGPT guide agents#348. Its docs-sync PR brings /guides/sign-in-with-chatgpt.

@railway-app
railway-app Bot temporarily deployed to rivet-website / website-pr-131 October 8, 2026 19:42 Destroyed
@railway-app

railway-app Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

🚅 Deployed to the website-pr-131 environment in rivet-website

Service Status Web Updated
website 🕒 Building (View Logs) Web Oct 8, 2026 at 11:21 pm UTC

@the-company-company the-company-company Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ No issues found

Reviewed commit 7240a07.

@railway-app
railway-app Bot temporarily deployed to rivet-website / website-pr-131 October 8, 2026 23:18 Destroyed

@the-company-company the-company-company Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔴 1 high-severity finding

Reviewed commit 3d6b55d.

Comment on lines 29 to +30
for (const entry of await getCollection('docs')) {
// The glob loader collapses `learn/index.mdx` to the id `actors/learn`;
// that page is replaced by the website-owned overview below.
if (entry.id === ACTORS_LEARN_CONTENT_PREFIX) continue;
if (!entry.id.startsWith(learnPrefix)) continue;
const slug = entry.id.slice(learnPrefix.length);
descriptions[guideHref(slug)] = entry.data.description;
paths.push({
params: { slug: getContentParamSlug(slug) },
props: {
entry,
editUrlOverride: `https://github.com/rivet-dev/rivet/edit/main/docs/actors/content/learn/${slug}.mdx`,
},
});
}

for (const guide of SITE_GUIDES) {
const entry = siteGuides.get(guide.slug);
if (!entry) {
const guide = guideForContentId(entry.id);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔴 High · The new loader drops every guide before the vendor sync exists

This head deletes the four website-owned guides and stops reading actors/learn, but the committed Actors bundle still contains only content/learn/ and a "learn" sidebar—there is no content/guides/ or "guides" key for this loop to discover. As a result /guides/ contains only the overview and all existing guide URLs disappear (and the build check is currently failing). Land the Actors repository change through its bot-generated docs-sync/* PR and rebase it into this head before switching the loader/deleting the old sources, or retain a compatibility fallback until that sync is present.

Each product bundle may ship content/guides/<slug>.mdx and a "guides" key in
its sidebar.json, linked as /guides/<slug>. The Guides tab lists every bundle's
groups in product order and merges groups with the same title, and guides keep
resolving <CodeSnippet> paths against their own repo.

- src/sitemap/guides.ts: GUIDE_BUNDLES and content-id helpers replace the
  Actors-only learn prefix and SITE_GUIDES.
- guidesSidebar(): website Overview group, then merged bundle groups.
- check-sitemap: sidebar and content agree per bundle, and a slug defined by
  two bundles fails the build. The route also throws on a duplicate.
- The four website-owned guides moved to rivet-dev/rivet's Actors bundle.
  vendor/actors carries that change (rivet-dev/rivet#5853) so this PR is
  self-consistent. /actors/learn/* still redirects to /guides/*.

Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-d43d6059-e31e-4220-91d1-5e00ec65c552
@railway-app
railway-app Bot temporarily deployed to rivet-website / website-pr-131 October 8, 2026 23:21 Destroyed

@the-company-company the-company-company Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ No issues found

Reviewed commit 6a2a4bb.

@NathanFlurry
NathanFlurry merged commit 1feb921 into main Oct 8, 2026
3 of 4 checks passed
@NathanFlurry
NathanFlurry deleted the feat/merged-guides branch October 8, 2026 23:25

This branch was successfully deployed

No deployments
rivet-website / website-pr-131 — 6a2a4bb8 Deployed Oct 8, 2026 by railway-app[bot]
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.

1 participant