feat(docs): add Fumadocs documentation site#8
Open
azizbecha wants to merge 1 commit into
Open
Conversation
New `docs/` workspace built on Next.js 16 + Fumadocs 16, served via `yarn docs:dev` and `yarn docs:build`. Pages - Introduction with quick start + live `<LinkPreviewDemo />` - Installation (yarn/npm/pnpm/bun tabs, peer deps, RN-web notes) - LinkPreview component (full prop table, live demo, behavior, styling) - useUrlPreview hook (signature, return shape, cancellation, validation) - Caching (defaults, configureCache, invalidateUrl, clearCache) - API reference (every export with signatures) Live demos - `LinkPreviewDemo` is a thin client component that imports the actual `LinkPreview` from the library and renders inside an RN-web container. - `next.config.mjs` aliases `react-native` -> `react-native-web` for both Turbopack (dev) and webpack (prod), and adds RN-style `.web.*` extension precedence. Workspace plumbing - Yarn 3 doesn't symlink the root workspace package into a sibling workspace's node_modules. `docs/scripts/link-workspace-root.mjs` runs in `postinstall` to create `docs/node_modules/react-native-preview-url` -> the repo root. - Root `tsconfig.json` and `tsconfig.build.json` exclude `docs/` so the library's typecheck and bob build don't trip on Next.js-only globals. - oxlint/oxfmt ignore `docs/.next/`, `docs/.source/`, `docs/out/`, plus `docs/content/` (oxfmt mishandles MDX with nested code fences). Verification - `yarn lint`, `yarn format:check`, `yarn typecheck`, `yarn test` all green. - `yarn docs:build` produces 10 routes (home + 6 docs pages + search + 404 + dynamic catch-all) in ~6 s.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
New `docs/` workspace serving the library's documentation. Built on Next.js 16 + Fumadocs 16 (App Router + MDX + Orama search).
Pages
Live demos
`LinkPreviewDemo` is a thin client component that imports the actual `LinkPreview` from the library. `next.config.mjs` aliases `react-native` → `react-native-web` for both Turbopack (dev) and webpack (prod).
Workspace plumbing
Test plan