Skip to content
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

Sync #404

Merged
merged 9 commits into from
May 28, 2024
Merged

Sync #404

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .changeset/itchy-pumpkins-care.md

This file was deleted.

6 changes: 3 additions & 3 deletions apps/docs/content/blog/why-docs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ I'll just recommend writing your docs in markdown, make it accessible on your Gi

Now you may wonder, why major services and frameworks have their own docs sites built with docs frameworks?

Of course, *Usually* using things like GitHub Wiki is adequate, but it is not always true.
Of course, _Usually_ using things like GitHub Wiki is adequate, but it is not always true.
Let's take Component Library for example, you cannot showcase your components with Markdown.
You will constantly find an ordinary Markdown document lacks of capability and flexibility.

Expand Down Expand Up @@ -65,7 +65,7 @@ You may notice, we do not have animations everywhere, and we avoided many fancy
Fanciness of UI should stay only in landing page, a docs site should focus on **content.**
Navigation elements are helpers to browse your site, never should they take up too much space on the screen.

One thing I hated the most is the design of *two sidebars*, it is confusing and meaningless.
One thing I hated the most is the design of _two sidebars_, it is confusing and meaningless.
You can just organize all items to a single, clean sidebar, but people instead added two hamburger buttons to the navbar.

<div className='mx-auto max-w-[400px]'>
Expand All @@ -81,4 +81,4 @@ My favourite docs site is still [Linear docs](https://linear.app/docs), looks go
1. You don't need a full-powered docs framework for a small library
2. Don't make a docs site on your own, use a proper docs framework
3. Fumadocs focuses on reading experience
4. You should focus on content, too
4. You should focus on content, too
34 changes: 28 additions & 6 deletions apps/docs/content/docs/ui/blocks/root-provider.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,33 @@ export default function Layout({ children }) {
}
```

In addition, You can customize the search dialog from the root provider.
### Search Dialog

```json doc-gen:typescript
{
"file": "./content/docs/ui/props.ts",
"name": "ProviderProps"
}
Customize or disable the search dialog with `search` option.

```jsx
<RootProvider
search={{
enabled: false,
}}
>
{children}
</RootProvider>
```

Learn more from [Search](/docs/ui/search).

### Theme Provider

Fumadocs supports light/dark modes with [`next-themes`](https://github.com/pacocoursey/next-themes).
Customise or disable it with `theme` option.

```jsx
<RootProvider
theme={{
enabled: false,
}}
>
{children}
</RootProvider>
```
3 changes: 0 additions & 3 deletions apps/docs/content/docs/ui/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import type { Card } from 'fumadocs-ui/components/card';
import type { DocsLayoutProps } from 'fumadocs-ui/layout';
import type { AnchorHTMLAttributes, ComponentPropsWithoutRef } from 'react';
import type { DocsPageProps } from 'fumadocs-ui/page';
import type { RootProviderProps } from 'fumadocs-ui/provider';
import type { AutoTypeTable } from 'fumadocs-typescript/ui';

export type AccordionsProps = Omit<
Expand Down Expand Up @@ -68,8 +67,6 @@ export type TOCProps = NonNullable<DocsPageProps['tableOfContent']>;

export type FooterProps = NonNullable<DocsPageProps['footer']>;

export type ProviderProps = RootProviderProps;

export type AutoTypeTableProps = ComponentPropsWithoutRef<typeof AutoTypeTable>;

export interface AutoTypeTableExample {
Expand Down
1 change: 1 addition & 0 deletions apps/docs/content/docs/ui/search.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ When not specified, it uses the [Default Search Client](/docs/headless/search/fl
### Custom Links

Add custom link items to search dialog.
They are shown as fallbacks when the query is empty.

```jsx
import { RootProvider } from 'fumadocs-ui/root-provider';
Expand Down
11 changes: 9 additions & 2 deletions apps/docs/content/docs/ui/theme.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,16 @@ For Tailwind CSS projects, use the official Tailwind CSS plugin.
By using the Tailwind CSS plugin, or the pre-built stylesheet, your default border, text and background
colors will be changed.

### Light/Dark Modes

Fumadocs supports light/dark modes with [`next-themes`](https://github.com/pacocoursey/next-themes).
The Theme Provider is a part of Root Provider.

See [Root Provider](/docs/ui/blocks/root-provider#theme-provider) to learn more.

### RTL Layout

Fumadocs UI has support for RTL (Right-to-left) layout. To enable, you can pass the `dir` prop to body.
RTL (Right-to-left) layout is supported. To enable RTL, pass the `dir` prop to body.

```tsx
<body dir="rtl"></body>
Expand Down Expand Up @@ -82,7 +89,7 @@ The official Tailwind CSS plugin introduces new colors and extra utilities inclu

### Presets

It comes with several theme presets out-of-the-box, you can pick one you prefer rather than the default one.
It comes with many theme presets out-of-the-box, you can pick one you prefer rather than the default one.

```js
import { createPreset } from 'fumadocs-ui/tailwind-plugin';
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"react-dom": "^18.3.1",
"rehype-katex": "^7.0.0",
"remark-math": "^6.0.0",
"shiki": "^1.6.0",
"shiki": "^1.6.1",
"tailwind-merge": "^2.3.0",
"zod": "^3.23.8"
},
Expand Down
6 changes: 3 additions & 3 deletions examples/contentlayer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
},
"dependencies": {
"contentlayer": "0.3.4",
"fumadocs-contentlayer": "1.1.25",
"fumadocs-core": "11.2.1",
"fumadocs-ui": "11.2.1",
"fumadocs-contentlayer": "1.1.26",
"fumadocs-core": "11.2.2",
"fumadocs-ui": "11.2.2",
"next": "^14.2.3",
"next-contentlayer": "^0.3.4",
"react": "18.3.1",
Expand Down
6 changes: 3 additions & 3 deletions examples/i18n/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"start": "next start"
},
"dependencies": {
"fumadocs-core": "11.2.1",
"fumadocs-mdx": "8.2.23",
"fumadocs-ui": "11.2.1",
"fumadocs-core": "11.2.2",
"fumadocs-mdx": "8.2.24",
"fumadocs-ui": "11.2.2",
"next": "^14.2.3",
"react": "18.3.1",
"react-dom": "18.3.1"
Expand Down
6 changes: 3 additions & 3 deletions examples/next-mdx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"start": "next start"
},
"dependencies": {
"fumadocs-core": "11.2.1",
"fumadocs-mdx": "8.2.23",
"fumadocs-ui": "11.2.1",
"fumadocs-core": "11.2.2",
"fumadocs-mdx": "8.2.24",
"fumadocs-ui": "11.2.2",
"next": "^14.2.3",
"react": "18.3.1",
"react-dom": "18.3.1"
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"prettier": "@vercel/style-guide/prettier",
"devDependencies": {
"@changesets/cli": "^2.27.3",
"@typescript-eslint/eslint-plugin": "^7.10.0",
"@typescript-eslint/parser": "^7.10.0",
"@typescript-eslint/eslint-plugin": "^7.11.0",
"@typescript-eslint/parser": "^7.11.0",
"@vercel/style-guide": "^6.0.0",
"concurrently": "^8.2.2",
"eslint": "^8.57.0",
Expand Down
6 changes: 6 additions & 0 deletions packages/contentlayer/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# fumadocs-contentlayer

## 1.1.26

### Patch Changes

- [email protected]

## 1.1.25

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/contentlayer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fumadocs-contentlayer",
"version": "1.1.25",
"version": "1.1.26",
"description": "The Contentlayer adapter for Fumadocs",
"keywords": [
"NextJs",
Expand Down
2 changes: 2 additions & 0 deletions packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# next-docs-zeta

## 11.2.2

## 11.2.1

## 11.2.0
Expand Down
8 changes: 4 additions & 4 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fumadocs-core",
"version": "11.2.1",
"version": "11.2.2",
"description": "The library for building a documentation website in Next.js",
"keywords": [
"NextJs",
Expand Down Expand Up @@ -120,8 +120,8 @@
},
"dependencies": {
"@formatjs/intl-localematcher": "^0.5.4",
"@shikijs/rehype": "^1.6.0",
"@shikijs/transformers": "^1.6.0",
"@shikijs/rehype": "^1.6.1",
"@shikijs/transformers": "^1.6.1",
"flexsearch": "0.7.21",
"github-slugger": "^2.0.0",
"hast-util-to-estree": "^3.1.0",
Expand All @@ -132,7 +132,7 @@
"remark-gfm": "^4.0.0",
"remark-mdx": "^3.0.1",
"scroll-into-view-if-needed": "^3.1.0",
"shiki": "^1.6.0",
"shiki": "^1.6.1",
"swr": "^2.2.5",
"unist-util-visit": "^5.0.0"
},
Expand Down
8 changes: 4 additions & 4 deletions packages/create-app-versions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
"@types/react-dom": "^18.3.0",
"autoprefixer": "^10.4.19",
"contentlayer": "^0.3.4",
"fumadocs-contentlayer": "^1.1.25",
"fumadocs-core": "^11.2.1",
"fumadocs-mdx": "^8.2.23",
"fumadocs-ui": "^11.2.1",
"fumadocs-contentlayer": "^1.1.26",
"fumadocs-core": "^11.2.2",
"fumadocs-mdx": "^8.2.24",
"fumadocs-ui": "^11.2.2",
"next": "^14.2.3",
"next-contentlayer": "^0.3.4",
"postcss": "^8.4.38",
Expand Down
2 changes: 2 additions & 0 deletions packages/create-app/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# create-next-docs-app

## 11.2.2

## 11.2.1

## 11.2.0
Expand Down
2 changes: 1 addition & 1 deletion packages/create-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-fumadocs-app",
"version": "11.2.1",
"version": "11.2.2",
"description": "Create a new documentation site with Fumadocs",
"keywords": [
"NextJs",
Expand Down
6 changes: 6 additions & 0 deletions packages/mdx/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# next-docs-mdx

## 8.2.24

### Patch Changes

- [email protected]

## 8.2.23

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/mdx/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fumadocs-mdx",
"version": "8.2.23",
"version": "8.2.24",
"description": "The built-in source for Fumadocs",
"keywords": [
"NextJs",
Expand Down
6 changes: 3 additions & 3 deletions packages/twoslash/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@
"types:check": "tsc --noEmit"
},
"dependencies": {
"@shikijs/twoslash": "1.6.0",
"mdast-util-from-markdown": "^2.0.0",
"@shikijs/twoslash": "1.6.1",
"mdast-util-from-markdown": "^2.0.1",
"mdast-util-gfm": "^3.0.0",
"mdast-util-to-hast": "^13.1.0",
"shiki": "1.6.0"
"shiki": "1.6.1"
},
"devDependencies": {
"@types/hast": "^3.0.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"dependencies": {
"fast-glob": "^3.3.1",
"hast-util-to-jsx-runtime": "^2.3.0",
"mdast-util-from-markdown": "^2.0.0",
"mdast-util-from-markdown": "^2.0.1",
"mdast-util-gfm": "^3.0.0",
"mdast-util-to-hast": "^13.1.0"
},
Expand Down
8 changes: 8 additions & 0 deletions packages/ui/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# next-docs-ui

## 11.2.2

### Patch Changes

- dd0feb2: Support customising sidebar background with opacity
- 72096c3: Support customising theme options from root provider
- [email protected]

## 11.2.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fumadocs-ui",
"version": "11.2.1",
"version": "11.2.2",
"description": "The framework for building a documentation website in Next.js",
"keywords": [
"NextJs",
Expand Down
5 changes: 0 additions & 5 deletions packages/ui/src/contexts/search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ export interface SearchProviderProps {
*/
links?: SearchLink[];

/**
* The shortcuts to trigger search dialog
*/
hotKey?: string[];

/**
* Replace default search dialog, allowing you to use other solutions such as Algolia Search
*
Expand Down
Loading
Loading