Skip to content
Closed
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
18 changes: 0 additions & 18 deletions docs/next.config.js

This file was deleted.

24 changes: 24 additions & 0 deletions docs/next.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import nextra from 'nextra';
import { remarkSandpack } from 'remark-sandpack';

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

/** @type {import('next').NextConfig} */
export default withNextra({
async redirects() {
return [
{
source: '/docs/:path*',
destination: '/en/docs/:path*',
permanent: true,
},
];
},
});
4 changes: 2 additions & 2 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"@codesandbox/sandpack-react": "^2.14.5",
"@codesandbox/sandpack-themes": "^2.0.21",
"next": "14.2.4",
"nextra": "^2.13.4",
"nextra-theme-docs": "^2.13.4",
"nextra": "^3.0.0",
"nextra-theme-docs": "^3.0.0",
"react": "^18",
"react-dom": "^18",
"react-tooltip": "^5.27.1",
Expand Down
10 changes: 7 additions & 3 deletions docs/src/components/HomePage.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Image from 'next/image';
import { Link } from 'nextra-theme-docs';
import Link from 'next/link';
import { useRouter } from 'next/router.js';

export const HomePage = ({
title,
Expand All @@ -12,6 +13,9 @@ export const HomePage = ({
buttonText: string;
items: { title: string; desc: string }[];
}) => {
const { asPath } = useRouter();
const locale = asPath.startsWith('/ko') ? 'ko' : 'en';

return (
<div className="flex md:h-[calc(100vh-162px)] pt-12">
<div className="flex flex-col md:h-full md:mr-8 flex-1">
Expand All @@ -22,8 +26,8 @@ export const HomePage = ({
<p className="text-2xl max-lg:text-xl leading-normal break-words">{description}</p>
</h1>
<div>
<Link href="/docs/overview">
<span className="inline-block rounded-xl nx-bg-gray-100 dark:nx-bg-neutral-800 px-10 py-3 text-xl font-bold hover:bg-gray-200">
<Link href={`/${locale}/docs/overview`}>
<span className="inline-block rounded-xl bg-neutral-800 dark:bg-gray-100 text-white dark:text-black px-10 py-3 text-xl font-bold hover:bg-neutral-700 dark:hover:bg-gray-200">
{buttonText}
</span>
</Link>
Expand Down
5 changes: 0 additions & 5 deletions docs/src/middleware.ts

This file was deleted.

3 changes: 2 additions & 1 deletion docs/src/pages/_app.mdx → docs/src/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import '../styles/globals.css';

import type { AppProps } from 'next/app';
import { Tooltip } from 'react-tooltip';

export default function App({ Component, pageProps }) {
export default function App({ Component, pageProps }: AppProps) {
return (
<>
<Component {...pageProps} />
Expand Down
13 changes: 0 additions & 13 deletions docs/src/pages/_meta.en.json

This file was deleted.

13 changes: 0 additions & 13 deletions docs/src/pages/_meta.ko.json

This file was deleted.

10 changes: 10 additions & 0 deletions docs/src/pages/_meta.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export default {
en: {
type: 'page',
title: 'English',
},
ko: {
type: 'page',
title: '한국어',
},
};
30 changes: 0 additions & 30 deletions docs/src/pages/docs/_meta.en.json

This file was deleted.

30 changes: 0 additions & 30 deletions docs/src/pages/docs/_meta.ko.json

This file was deleted.

13 changes: 13 additions & 0 deletions docs/src/pages/en/_meta.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
export default {
index: {
type: 'page',
display: 'hidden',
theme: {
layout: 'full',
},
},
docs: {
type: 'page',
title: 'View Docs',
},
};
35 changes: 35 additions & 0 deletions docs/src/pages/en/docs/_meta.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
export default {
'--- introduction': {
type: 'separator',
title: 'Introduction',
},
overview: 'Overview',
features: 'Main Features',
'--- Guide': {
type: 'separator',
title: 'Guide',
},
install: 'Installation',
'get-started': 'Getting Started',
migration: 'Migrating from @toss/use-funnel',
'--- Reference': {
type: 'separator',
title: 'Reference',
},
'use-funnel': 'useFunnel()',
'funnel-render': 'funnel.Render Component',
'--- Advanced': {
type: 'separator',
title: 'Advanced',
},
'context-guide': 'Step-by-Step Definition of context',
'sub-funnel': 'Creating a Funnel within a Funnel',
'custom-router': 'Creating a Custom Router',
'transition-event': 'Define Transition Events',
overlay: 'Using Overlay',
'--- Examples': {
type: 'separator',
title: 'Examples',
},
examples: 'Examples',
};
Loading
Loading