Skip to content

Spike - Add IDs to docs to trace a doc across versions #490

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

RubenSandwich
Copy link
Contributor

@RubenSandwich RubenSandwich commented Jun 13, 2025

A spike of implementing linking doc IDs across versions in UDR

This will require the following work:

  • Add UUIDs to UDRs docs frontmatter
    • I suggest we use UUID v4 as it has time as an input in generation which should make collisions very low IMO
  • Add doc UUIDs to app/api/docsPathsAllVersions.json
  • Extend app/api/content-versions/route.ts or make app/api/v2/content-versions/route.ts (I am leaning towards a v2, as this is quite a change.)
    • That when given a doc UUID it returns it's versions and paths
      • (The current version only return versions)
  • Extend fetchValidVersions in dev-portal to hit the new API api/v2/content-versions and return not just versions but versions and paths
  • Extend DocsVersionSwitcher's options to take a path for it's version and then use that option.path to construct it's href

Some tools around this that would be helpful:

  • GHA that fails if a new doc doesn't have a UUID
  • GHA that fails if in a version a UUID is reused

@RubenSandwich RubenSandwich changed the title Add id to docs and put them into versions metadata Spike - Add IDs to docs to trace a doc across versions Jun 13, 2025
Copy link

github-actions bot commented Jun 13, 2025

Vercel Previews Deployed

Name Status Preview Updated (UTC)
Dev Portal ✅ Ready (Inspect) Visit Preview Fri Jun 13 20:01:19 UTC 2025
Unified Docs API ✅ Ready (Inspect) Visit Preview Fri Jun 13 19:55:40 UTC 2025

Copy link

github-actions bot commented Jun 13, 2025

Broken Link Checker

No broken links found! 🎉

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