For the complete documentation index, see llms.txt. Markdown variants are available by appending .md to any URL or sending an Accept: text/markdown header. An agent skill is available at /.well-known/agent-skills/site-skill.md.
/
278
Sponsor

Registry

Learn how to use the ogimagecn registry with the shadcn CLI.

The ogimagecn registry ships Open Graph image blocks and the components they are built from in the shadcn registry format. Register the namespace once in components.json, then pull items by name with the CLI.

Setup

Add a registries entry for this site. See the shadcn registry documentation for all components.json fields and behaviors.

{
  "registries": {
    "@ogimagecn": "https://ogimagecn.com/r/{name}.json"
  }
}

You can replace @ogimagecn with another namespace; it only needs to match what you pass to shadcn add.

Usage

Items are addressed by the item name, the same as the JSON file under /r/ without .json.

Registry files follow this destination:

  • Blocks and components install into components/og/.

Blocks list the components they use as registryDependencies, so the CLI installs those too:

$ pnpm dlx shadcn@latest add @ogimagecn/blog

Without a registry alias, use the full URL (as on each docs page):

$ pnpm dlx shadcn@latest add https://ogimagecn.com/r/blog.json