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

Migrate to Nextra 3 #217

Merged
merged 6 commits into from
Oct 10, 2024
Merged
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
2 changes: 1 addition & 1 deletion docs/next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.
11 changes: 6 additions & 5 deletions docs/next.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
const withNextra = require('nextra')({
import nextra from 'nextra';

const withNextra = nextra({
theme: 'nextra-theme-docs',
themeConfig: './theme.config.tsx',
defaultShowCopyCode: true,
});

module.exports = {
...withNextra(),
export default withNextra({
output: 'export',
images: {
unoptimized: true,
},
};
});
19 changes: 10 additions & 9 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
"name": "forui-docs",
"version": "0.0.1",
"description": "Documentation for Forui.",
"type": "module",
"scripts": {
"dev": "next dev",
"build": "next build",
"export": "next build && next export",
"export": "next build",
"start": "next start"
},
"bugs": {
Expand All @@ -15,18 +16,18 @@
"dependencies": {
"clsx": "^2.1.1",
"lucide-react": "^0.447.0",
"next": "^13.5.6",
"nextra": "^2.13.4",
"nextra-theme-docs": "^2.13.4",
"next": "^14.2.14",
"nextra": "^3.0.8",
"nextra-theme-docs": "^3.0.8",
"react": "18.3.1",
"react-dom": "18.3.1",
"tailwind-merge": "^2.4.0"
"tailwind-merge": "^2.5.2"
},
"devDependencies": {
"@types/node": "22.7.4",
"autoprefixer": "^10.4.19",
"postcss": "^8.4.38",
"tailwindcss": "^3.4.4",
"typescript": "^5.0.0"
"autoprefixer": "^10.4.20",
"postcss": "^8.4.47",
"tailwindcss": "^3.4.13",
"typescript": "^5.6.2"
}
}
File renamed without changes.
24 changes: 0 additions & 24 deletions docs/pages/_meta.json

This file was deleted.

24 changes: 24 additions & 0 deletions docs/pages/_meta.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
export default {
index: {
title: 'Home',
type: 'page'
},
docs: {
title: 'Documentation',
type: 'page'
},
social: {
title: 'Core Team',
type: 'menu',
items: {
'x-joe': {
title: 'Joe Kawai',
href: 'https://x.com/kawaijoe'
},
'x-matthias': {
title: 'Matthias Ngeo',
href: 'https://x.com/matthiasngeo'
}
}
}
};
20 changes: 0 additions & 20 deletions docs/pages/docs/_meta.json

This file was deleted.

27 changes: 27 additions & 0 deletions docs/pages/docs/_meta.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
export default {
index: 'Getting Started',
themes: 'Themes',
'icon-library': 'Icon Library',
api_reference: {
title: 'API Reference ↗',
href: 'https://pub.dev/documentation/forui',
newWindow: true
},
pub_dev: {
title: 'Pub Dev ↗',
href: 'https://pub.dev/packages/forui',
newWindow: true
},

'-- widgets': {
type: 'separator',
title: 'Widgets'
},
// TODO: Workaround for a seperator bug. Remove when patched.
// A page need to be listed after a separator or else the order will be messed up.
accordion: 'Accordion',
'*': {
title: ''
},

};
8 changes: 4 additions & 4 deletions docs/pages/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ The library is designed with the following core principles in mind:

## Quick Links

import {Cards, Card} from 'nextra/components';
import {Cards} from 'nextra/components';
import {Sparkles, MessagesSquare, FolderGit2} from 'lucide-react';

<Cards>
<Card icon={<Sparkles/>} title="Get Started" href="/docs"/>
<Card icon={<MessagesSquare/>} title="Discussion" href="https://github.com/forus-labs/forui/discussions"/>
<Card icon={<FolderGit2/>} title="Source" href="https://github.com/forus-labs/forui"/>
<Cards.Card icon={<Sparkles/>} title="Get Started" href="/docs"/>
<Cards.Card icon={<MessagesSquare/>} title="Discussion" href="https://github.com/forus-labs/forui/discussions"/>
<Cards.Card icon={<FolderGit2/>} title="Source" href="https://github.com/forus-labs/forui"/>
</Cards>

## FAQ
Expand Down
Loading
Loading