Skip to content

Host generated shadcn registry files #2

@nathangathright

Description

@nathangathright

Context

The package now generates shadcn-compatible registry items into static/r/ via pnpm build:registry. Each generated item can install a standalone React component for a platform, e.g. spotify.json exports SpotifyIcon and SpotifyBadge.

The missing piece is that shadcn registry aliases require the generated JSON files to be available at a public URL pattern, for example:

{
  "registries": {
    "@podlink": "https://podlink-icons.example/r/{name}.json"
  }
}

Right now static/ is gitignored build output, so a raw GitHub URL will not work unless we intentionally publish or commit those generated files somewhere.

Desired outcome

Publish static/r/*.json and static/r/index.json at a stable public URL so users can run:

pnpm dlx shadcn@latest add @podlink/spotify
pnpm dlx shadcn@latest add @podlink/apple

Options to evaluate

  • Host a tiny static site on GitHub Pages from generated static/ output.
  • Add a deployment target such as Vercel, Netlify, or Cloudflare Pages.
  • Commit only static/r/ while continuing to ignore generated icon and badge SVG output.
  • Keep static/ generated-only and publish registry files from CI as release or Pages artifacts.

Acceptance criteria

  • https://<host>/r/spotify.json returns a valid shadcn registry item.
  • https://<host>/r/index.json returns the registry index.
  • README documents the final registry alias URL.
  • pnpm build remains the source of truth for regenerating registry files.
  • A clean shadcn install command succeeds against the hosted registry URL.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions