-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from bryan308/migrate-fumadocsv14
Migrate fumadocsv14
- Loading branch information
Showing
85 changed files
with
6,739 additions
and
9,660 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": ["next/core-web-vitals", "next/typescript"] | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,28 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
# deps | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
.yarn/install-state.gz | ||
|
||
# testing | ||
/coverage | ||
# generated content | ||
.contentlayer | ||
.content-collections | ||
.source | ||
|
||
# next.js | ||
# test & build | ||
/coverage | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
*.tsbuildinfo | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
/.pnp | ||
.pnp.js | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# local env files | ||
# others | ||
.env*.local | ||
.env | ||
|
||
# vercel | ||
.vercel | ||
|
||
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts | ||
|
||
# content collections | ||
.content-collections | ||
.source | ||
|
||
# Contentlayer | ||
.contentlayer | ||
next-env.d.ts |
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,26 @@ | ||
# Introduction | ||
# ca-resources | ||
|
||
Welcome to **CA Resources**! | ||
This is a Next.js application generated with | ||
[Create Fumadocs](https://github.com/fuma-nama/fumadocs). | ||
|
||
It is a website designed to improve productivity, especially for web development, among other fields in education. It provides the most valuable resources and guides. | ||
Run development server: | ||
|
||
```bash | ||
npm run dev | ||
# or | ||
pnpm dev | ||
# or | ||
yarn dev | ||
``` | ||
|
||
Open http://localhost:3000 with your browser to see the result. | ||
|
||
## Learn More | ||
|
||
To learn more about Next.js and Fumadocs, take a look at the following | ||
resources: | ||
|
||
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js | ||
features and API. | ||
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. | ||
- [Fumadocs](https://fumadocs.vercel.app) - learn about Fumadocs |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
import type { ReactNode } from "react" | ||
import { HomeLayout } from "fumadocs-ui/home-layout" | ||
import { baseOptions } from "../layout.config" | ||
import type { ReactNode } from 'react'; | ||
import { HomeLayout } from 'fumadocs-ui/layouts/home'; | ||
import { baseOptions } from '@/app/layout.config'; | ||
|
||
export default function Layout({ children }: { children: ReactNode }): React.ReactElement { | ||
return <HomeLayout {...baseOptions}>{children}</HomeLayout> | ||
export default function Layout({ | ||
children, | ||
}: { | ||
children: ReactNode; | ||
}): React.ReactElement { | ||
return <HomeLayout {...baseOptions}>{children}</HomeLayout>; | ||
} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,4 @@ | ||
import { guides } from "@/app/source" | ||
// import { resourcesData } from "@/data/resources" | ||
import { createSearchAPI } from "fumadocs-core/search/server" | ||
import { guides } from "@/lib/source" | ||
import { createFromSource } from "fumadocs-core/search/server" | ||
|
||
export const { GET } = createSearchAPI("advanced", { | ||
indexes: guides.getPages().map((page) => ({ | ||
title: page.data.title, | ||
structuredData: page.data.structuredData, | ||
id: page.url, | ||
url: page.url, | ||
})), | ||
}) | ||
|
||
// TODO include resources in search | ||
// const resourcePages = Object.keys(resourcesData).flatMap((key) => | ||
// resourcesData[key].resourcesList.map((resource) => ({ | ||
// title: resource.title, | ||
// structuredData: resource.structuredData, | ||
// id: resource.title.toLowerCase().replace(/\s+/g, "-"), | ||
// url: resource.links.map((link) => link.url).join(","), | ||
// })) | ||
// ) | ||
|
||
// export const { GET } = createSearchAPI("advanced", { | ||
// indexes: [ | ||
// ...guides.getPages().map((page) => ({ | ||
// title: page.data.title, | ||
// structuredData: page.data.structuredData, // Guides have structuredData | ||
// id: page.url, | ||
// url: page.url, | ||
// })), | ||
// ...resourcePages.map((resource) => ({ | ||
// title: resource.title, | ||
// structuredData: resource.structuredData, // Resources now have structuredData | ||
// id: resource.id, | ||
// url: resource.url, | ||
// })), | ||
// ], | ||
// }) | ||
export const { GET } = createFromSource(guides) |
Oops, something went wrong.