Skip to content
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# docs
# FnApi Docs

Source code for https://docs.fnapi.dev
Source code for https://fnapi.dev
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
},
"dependencies": {
"next": "^12.1.5-canary.4",
"nextra": "2.0.0-alpha.48",
"nextra-theme-docs": "^1.2.6",
"nextra": "2.0.0-alpha.56",
"nextra-theme-docs": "2.0.0-alpha.59",
"react": "^18.0.0",
"react-dom": "^18.0.0"
},
Expand Down
20 changes: 18 additions & 2 deletions pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
import { NextPage } from "next";
import { AppProps } from "next/app";
import "nextra-theme-docs/style.css";
export default function Nextra({ Component, pageProps }: any) {
return <Component {...pageProps} />;
import { ReactElement, ReactNode } from "react";

// https://nextjs.org/docs/basic-features/layouts#with-typescript

export type NextPageWithLayout = NextPage & {
getLayout?: (page: ReactElement) => ReactNode;
};

type AppPropsWithLayout = AppProps & {
Component: NextPageWithLayout;
};

export default function Nextra({ Component, pageProps }: AppPropsWithLayout) {
const getLayout = Component.getLayout ?? ((page) => page);

return getLayout(<Component {...pageProps} />);
}
5 changes: 5 additions & 0 deletions pages/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,8 @@ Features
- Invoke remote functions just like a local asynchronous function.
- Auto-generated typed clients.
- No boilerplace code, including codes related to http.

<div style={{ textAlign: "center", marginTop: "4rem" }}>
[Get Started](/docs/getting-started) · [GitHub
Repository](https://github.com/fnapi/fnapi)
</div>
13 changes: 10 additions & 3 deletions pages/meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
{
"index": {
"title": "Introduction",
"type": "nav",
"hidden": true
"type": "page",
"hidden": true,
"theme": {
"sidebar": false,
"toc": false,
"footer": true,
"pagination": true,
"breadcrumb": false
}
},
"docs": {
"title": "Docs",
"type": "nav"
"type": "page"
}
}
Loading