-
-
Notifications
You must be signed in to change notification settings - Fork 18
Fumaification #161
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
Draft
lleyton
wants to merge
15
commits into
main
Choose a base branch
from
fumadocs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Fumaification #161
Changes from 9 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
14645e9
migrate fumadocs repo into branch
lleyton 59425de
fix: duplicate homepage icons
lleyton 0b47420
feat: use logo
lleyton 421cb67
fix: match home icons with section icons
lleyton a73e5b8
chore: add favicon
lleyton fb50a35
Update index.mdx
nothingneko cd9d83d
Update chromebook.mdx
nothingneko 8e88289
Update servers.mdx
nothingneko a564041
Update broadcom-realtek.mdx
nothingneko 7dc53a9
Update filesystem.mdx
nothingneko a4c8435
Update filesystem.mdx
nothingneko f6dc2a2
Update software.mdx
nothingneko f4412a6
Update software.mdx
nothingneko 49a307b
Update software.mdx
nothingneko 90d52d8
port over fixes
nothingneko File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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,23 +1,26 @@ | ||
| # build output | ||
| dist/ | ||
| # generated types | ||
| .astro/ | ||
| # deps | ||
| /node_modules | ||
|
|
||
| # dependencies | ||
| node_modules/ | ||
| # generated content | ||
| .source | ||
|
|
||
| # logs | ||
| # test & build | ||
| /coverage | ||
| /.next/ | ||
| /out/ | ||
| /build | ||
| *.tsbuildinfo | ||
|
|
||
| # misc | ||
| .DS_Store | ||
| *.pem | ||
| /.pnp | ||
| .pnp.js | ||
| npm-debug.log* | ||
| yarn-debug.log* | ||
| yarn-error.log* | ||
| pnpm-debug.log* | ||
|
|
||
|
|
||
| # environment variables | ||
| .env | ||
| .env.production | ||
|
|
||
| # macOS-specific files | ||
| .DS_Store | ||
|
|
||
| bun.lockb | ||
| # others | ||
| .env*.local | ||
| .vercel | ||
| next-env.d.ts |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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,18 +1,47 @@ | ||
| # Ultramarine Linux Wiki | ||
| # wiki | ||
|
|
||
| Welcome to the source repository behind the [Ultramarine Wiki]! We welcome any contributions and | ||
| you may freely send pull requests to this repository if you would like to modify any of the | ||
| content here! | ||
nothingneko marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| This is a Next.js application generated with | ||
| [Create Fumadocs](https://github.com/fuma-nama/fumadocs). | ||
|
|
||
| ## Translations | ||
| It is a Next.js app with [Static Export](https://nextjs.org/docs/app/guides/static-exports) configured. | ||
nothingneko marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| If you'd like to translate for a new language: | ||
| Run development server: | ||
|
|
||
| 1. Go to `src/consts.ts` to add a new language into `KNOWN_LANGUAGES` | ||
| 2. Copy everything from `src/content/docs/en` to `src/content/docs/<your_language_code>`[^1] | ||
| 3. Add pages into `SIDEBAR` in `src/consts.ts` | ||
| 4. Start translating! | ||
| ```bash | ||
| npm run dev | ||
| # or | ||
| pnpm dev | ||
| # or | ||
| yarn dev | ||
| ``` | ||
|
|
||
| [^1]: We encourage you to use a generic language code without limiting the region. | ||
| Open http://localhost:3000 with your browser to see the result. | ||
|
|
||
| [Ultramarine Wiki]: https://wiki.ultramarine-linux.org | ||
| ## Explore | ||
|
|
||
| In the project, you can see: | ||
|
|
||
| - `lib/source.ts`: Code for content source adapter, [`loader()`](https://fumadocs.dev/docs/headless/source-api) provides the interface to access your content. | ||
| - `lib/layout.shared.tsx`: Shared options for layouts, optional but preferred to keep. | ||
|
|
||
| | Route | Description | | ||
| | ------------------------- | ------------------------------------------------------ | | ||
| | `app/(home)` | The route group for your landing page and other pages. | | ||
| | `app/docs` | The documentation layout and pages. | | ||
| | `app/api/search/route.ts` | The Route Handler for search. | | ||
|
|
||
| ### Fumadocs MDX | ||
|
|
||
| A `source.config.ts` config file has been included, you can customise different options like frontmatter schema. | ||
|
|
||
| Read the [Introduction](https://fumadocs.dev/docs/mdx) for further details. | ||
|
|
||
| ## 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.dev) - learn about Fumadocs | ||
This file contains hidden or 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,6 @@ | ||
| import { HomeLayout } from 'fumadocs-ui/layouts/home'; | ||
| import { baseOptions } from '@/lib/layout.shared'; | ||
|
|
||
| export default function Layout({ children }: LayoutProps<'/'>) { | ||
| return <HomeLayout {...baseOptions()}>{children}</HomeLayout>; | ||
| } |
This file contains hidden or 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,125 @@ | ||
| import { Card, Cards } from "fumadocs-ui/components/card"; | ||
| import { source } from "@/lib/source"; | ||
| import { icons as lucideIcons } from "lucide-react"; | ||
| import { createElement } from "react"; | ||
|
|
||
| const START = [ | ||
| { | ||
| title: "Get Started", | ||
| href: "/docs/get-started", | ||
| slug: "get-started", | ||
| icon: "CirclePower", | ||
| }, | ||
| { | ||
| title: "Using Ultramarine", | ||
| href: "/docs/usage", | ||
| slug: "usage", | ||
| icon: "Sailboat", | ||
| }, | ||
| ] as const; | ||
|
|
||
| const LEARN = [ | ||
| { | ||
| title: "Anywhere", | ||
| href: "/docs/anywhere", | ||
| slug: "anywhere", | ||
| icon: "Cpu", | ||
| }, | ||
| { | ||
| title: "Join the Community", | ||
| href: "/docs/community", | ||
| slug: "community", | ||
| icon: "MessageCircleHeart", | ||
| }, | ||
| { | ||
| title: "Linux Concepts", | ||
| href: "/docs/linux", | ||
| slug: "linux", | ||
| icon: "GraduationCap", | ||
| }, | ||
| { | ||
| title: "About Ultramarine", | ||
| href: "/docs/about", | ||
| slug: "about", | ||
| icon: "PawPrint", | ||
| }, | ||
| ] as const; | ||
|
|
||
| function getIcon(iconName: string | undefined): React.ReactNode | undefined { | ||
| if (!iconName) return undefined; | ||
| if (iconName in lucideIcons) { | ||
| return createElement(lucideIcons[iconName as keyof typeof lucideIcons]); | ||
| } | ||
| return undefined; | ||
| } | ||
|
|
||
| export default function HomePage() { | ||
| const start = START.map((section) => ({ | ||
| ...section, | ||
| description: source.getPage([section.slug])?.data.description ?? "", | ||
| icon: getIcon(section.icon), | ||
| })); | ||
| const learn = LEARN.map((section) => ({ | ||
| ...section, | ||
| description: source.getPage([section.slug])?.data.description ?? "", | ||
| icon: getIcon(section.icon), | ||
| })); | ||
|
|
||
| return ( | ||
| <div className="flex flex-col flex-1 container mx-auto max-w-5xl p-8 prose"> | ||
| <header> | ||
| <h1>Welcome to the Ultramarine Wiki!</h1> | ||
| <p></p> | ||
| </header> | ||
|
|
||
| <section> | ||
| <h2>Get Started and Settled</h2> | ||
| <Cards> | ||
| {start.map((section) => ( | ||
| <Card | ||
| key={section.slug} | ||
| title={section.title} | ||
| href={section.href} | ||
| description={section.description} | ||
| icon={section.icon} | ||
| /> | ||
| ))} | ||
| </Cards> | ||
| </section> | ||
|
|
||
| <section> | ||
| <h2>Learn More</h2> | ||
| <Cards> | ||
| {learn.map((section) => ( | ||
| <Card | ||
| key={section.slug} | ||
| title={section.title} | ||
| href={section.href} | ||
| description={section.description} | ||
| icon={section.icon} | ||
| /> | ||
| ))} | ||
| </Cards> | ||
| </section> | ||
|
|
||
| <section> | ||
| <h2>Community</h2> | ||
| <p> | ||
| Stuck? Have a question? Join our{" "} | ||
| <a href="https://fyralabs.com/discord">Discord</a> community. Our | ||
| community is friendly and always willing to help. | ||
| </p> | ||
| </section> | ||
|
|
||
| <section> | ||
| <h2>Contributing</h2> | ||
| <p> | ||
| This site is libre software and contributions are welcome. Check out | ||
| the{" "} | ||
| <a href="https://github.com/FyraLabs/devdocs">GitHub repository</a>{" "} | ||
| for more information. | ||
| </p> | ||
| </section> | ||
| </div> | ||
| ); | ||
| } |
This file contains hidden or 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,9 @@ | ||
| import { source } from '@/lib/source'; | ||
| import { createFromSource } from 'fumadocs-core/search/server'; | ||
|
|
||
| export const revalidate = false; | ||
|
|
||
| export const { staticGET: GET } = createFromSource(source, { | ||
| // https://docs.orama.com/docs/orama-js/supported-languages | ||
| language: 'english', | ||
| }); |
This file contains hidden or 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,60 @@ | ||
| import { getPageImage, source } from "@/lib/source"; | ||
| import { | ||
| DocsBody, | ||
| DocsDescription, | ||
| DocsPage, | ||
| DocsTitle, | ||
| } from "fumadocs-ui/layouts/docs/page"; | ||
| import { notFound } from "next/navigation"; | ||
| import { getMDXComponents } from "@/mdx-components"; | ||
| import type { Metadata } from "next"; | ||
| import { createRelativeLink } from "fumadocs-ui/mdx"; | ||
|
|
||
| export default async function Page(props: PageProps<"/[...slug]">) { | ||
| const params = await props.params; | ||
| const page = source.getPage(params.slug); | ||
| if (!page) notFound(); | ||
|
|
||
| const MDX = page.data.body; | ||
|
|
||
| return ( | ||
| <DocsPage | ||
| toc={page.data.toc} | ||
| full={page.data.full} | ||
| tableOfContent={{ | ||
| style: "clerk", | ||
| }} | ||
| > | ||
| <DocsTitle>{page.data.title}</DocsTitle> | ||
| <DocsDescription>{page.data.description}</DocsDescription> | ||
| <DocsBody> | ||
| <MDX | ||
| components={getMDXComponents({ | ||
| // this allows you to link to other pages with relative file paths | ||
| a: createRelativeLink(source, page), | ||
| })} | ||
| /> | ||
| </DocsBody> | ||
| </DocsPage> | ||
| ); | ||
| } | ||
|
|
||
| export async function generateStaticParams() { | ||
| return source.generateParams(); | ||
| } | ||
|
|
||
| export async function generateMetadata( | ||
| props: PageProps<"/[...slug]">, | ||
| ): Promise<Metadata> { | ||
| const params = await props.params; | ||
| const page = source.getPage(params.slug); | ||
| if (!page) notFound(); | ||
|
|
||
| return { | ||
| title: page.data.title, | ||
| description: page.data.description, | ||
| openGraph: { | ||
| images: getPageImage(page).url, | ||
| }, | ||
| }; | ||
| } |
This file contains hidden or 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,11 @@ | ||
| import { source } from '@/lib/source'; | ||
| import { DocsLayout } from 'fumadocs-ui/layouts/docs'; | ||
| import { baseOptions } from '@/lib/layout.shared'; | ||
|
|
||
| export default function Layout({ children }: LayoutProps<'/docs'>) { | ||
| return ( | ||
| <DocsLayout tree={source.getPageTree()} {...baseOptions()}> | ||
| {children} | ||
| </DocsLayout> | ||
| ); | ||
| } |
This file contains hidden or 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 @@ | ||
| @import "tailwindcss"; | ||
| @import "fumadocs-ui/css/neutral.css"; | ||
| @import "fumadocs-ui/css/preset.css"; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.