Conversation
Introduces a shadcn-CLI-installable registry for every published component doc:
- scripts/build-registry.js walks content/docs/**/*.mdx, resolves each
doc's source via the existing file=<rootDir>/... fenced blocks (works
across cross-category docs like feature-cards/* pointing to card/*),
pulls hook files referenced via @/hooks/*, extracts CSS blocks into
shadcn's nested { selector: { prop: value } } structure, and routes
@theme vars into cssVars.theme. Emits public/r/{category}/{name}.json
with ~/-prefixed targets, version-pinned dependencies (resolved from
package.json), categories, and author.
- components/registry-install.tsx renders pnpm/npm/yarn/bun tabs with a
shadcn@latest add URL, reusing the existing CopyButton. Registered in
mdx-components so any doc can drop <RegistryInstall category="..."
name="..." />.
- templates/doc scaffolds the CLI block into every new doc going forward.
- public/_headers: cache /r/* at the edge with stale-while-revalidate so
CLI installs hit cached JSON without blocking on origin.
- .env.production: bake https://animata.design for local prod builds
since Next inlines NEXT_PUBLIC_* vars at build time (CI already
overrides via workflow env).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…nt docs Touches all 163 published component docs to (a) surface the shadcn CLI install path above the existing manual steps, (b) upgrade terse descriptions into SEO-friendly copy, and (c) correct the long-standing framer-motion -> motion drift between install instructions and source. - scripts/inject-registry-install.js (idempotent) splits each ## Installation section into ### CLI (<RegistryInstall ... />) and ### Manual (existing <Steps>), preserving manual copy-paste flow for users who want it. - scripts/rewrite-descriptions.js rewrites 113 frontmatter descriptions. Existing usable copy is kept and padded; empty/short ones are synthesized from title + category + detected feature chips (motion, tsparticles, Radix, Lucide, hover/transforms/gradients/shadows) + category-specific use cases. Long descriptions get sentence-boundary trimming. After this pass: p50 desc length 124c (was 46c), no empty descriptions, max 158c (fits Google's meta cutoff). - 38 MDX docs updated: `npm install framer-motion` -> `npm install motion`. The actual component sources import from `motion/react` (package: motion@^12), so the original instructions would have left CLI users with a missing module error. - content/docs/card/notice-card.mdx normalized from CRLF to LF line endings; its frontmatter parser was silently failing on the CRLF, which is how we caught this. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Serves an LLM-friendly view of every component doc alongside the HTML
pages, following the llmstxt.org convention.
- scripts/build-docs-markdown.js emits public/docs/{category}/{name}.md
for every published doc. Resolves file=<rootDir>/... fenced blocks
with the actual source inline, expands <RegistryInstall ... /> into
the real `pnpm dlx shadcn@latest add ...` command, strips
<ComponentPreview> / <Steps> JSX, and prepends a header with title,
description, canonical URL, registry URL, author, and labels.
- scripts/build-llms-txt.js emits public/llms.txt (~27 KB index, H2s
in sidebar order with per-item links + descriptions) and
public/llms-full.txt (~506 KB, same index followed by inlined
markdown content). Base URL resolves via NEXT_PUBLIC_APP_URL with
animata.design fallback.
- public/_headers: set Content-Type: text/markdown; charset=utf-8 for
/docs/*.md, /llms.txt, and /llms-full.txt, plus the same CDN-friendly
Cache-Control + CORS as /r/*.
- Wired both generators into prebuild and registry:build.
- Generated outputs (public/docs, public/llms*.txt) are gitignored;
they rebuild every prebuild.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
Important Review skippedToo many files! This PR contains 174 files, which is 24 over the limit of 150. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (174)
You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Deploying animata with
|
| Latest commit: |
5c20a17
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://65fe8836.animata.pages.dev |
| Branch Preview URL: | https://feat-shadcn-registry.animata.pages.dev |
The synthesized descriptions from scripts/rewrite-descriptions.js felt templated and lost the voice of the original copy. Reverting the 113 MDX frontmatter descriptions to their state on main and removing the rewriter script. Registry JSONs and llms.txt regenerate from the restored descriptions (p50 desc length back to 46c, matching baseline). RegistryInstall insertions and the framer-motion -> motion fix from the same commit remain intact — only the description field was touched. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1df063dedb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
No description provided.