-
Notifications
You must be signed in to change notification settings - Fork 904
feat (docs): revamp -> swap to fumadoc #759
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,41 +1,26 @@ | ||
| # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
|
||
| # dependencies | ||
| # deps | ||
| /node_modules | ||
| /.pnp | ||
| .pnp.* | ||
| .yarn/* | ||
| !.yarn/patches | ||
| !.yarn/plugins | ||
| !.yarn/releases | ||
| !.yarn/versions | ||
|
|
||
| # testing | ||
| /coverage | ||
| # generated content | ||
| .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* | ||
| .pnpm-debug.log* | ||
|
|
||
| # env files (can opt-in for committing if needed) | ||
| .env* | ||
|
|
||
| # vercel | ||
| # others | ||
| .env*.local | ||
| .vercel | ||
|
|
||
| # typescript | ||
| *.tsbuildinfo | ||
| next-env.d.ts | ||
| next-env.d.ts |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,36 +1,45 @@ | ||
| This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app). | ||
| # docs | ||
|
|
||
| ## Getting Started | ||
| This is a Next.js application generated with | ||
| [Create Fumadocs](https://github.com/fuma-nama/fumadocs). | ||
|
|
||
| First, run the development server: | ||
| Run development server: | ||
|
|
||
| ```bash | ||
| npm run dev | ||
| # or | ||
| yarn dev | ||
| # or | ||
| pnpm dev | ||
| # or | ||
| bun dev | ||
| yarn dev | ||
| ``` | ||
|
|
||
| Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. | ||
| Open http://localhost:3000 with your browser to see the result. | ||
|
|
||
| You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. | ||
| ## Explore | ||
|
|
||
| This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel. | ||
| In the project, you can see: | ||
|
|
||
| ## Learn More | ||
| - `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. | ||
|
|
||
| To learn more about Next.js, take a look at the following resources: | ||
| | 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. | | ||
|
|
||
| - [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 MDX | ||
|
|
||
| A `source.config.ts` config file has been included, you can customise different options like frontmatter schema. | ||
|
|
||
| You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome! | ||
| Read the [Introduction](https://fumadocs.dev/docs/mdx) for further details. | ||
|
|
||
| ## Deploy on Vercel | ||
| ## Learn More | ||
|
|
||
| The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. | ||
| To learn more about Next.js and Fumadocs, take a look at the following | ||
| resources: | ||
|
|
||
| Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details. | ||
| - [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 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| --- | ||
| title: Introduction to Core Features | ||
| description: Core features of Superset | ||
| --- | ||
|
|
||
| ## Core Features | ||
|
|
||
| Superset has a few core features that are worth knowing about. | ||
|
|
||
| ### Workspace Management | ||
|
|
||
| Superset allows you to manage your workspaces in a way that is easy to understand and use. | ||
|
|
||
| ### Terminal Integration | ||
|
|
||
| Superset allows you to integrate your terminal into your workspace. | ||
|
|
||
| ### Team Collaboration | ||
|
|
||
| Superset allows you to collaborate with your team. | ||
|
|
||
| ### How It Works | ||
|
|
||
| Superset works by sitting on top of your existing git workflow and enhancing it with a visual interface and productivity tools. It doesn't replace git—it makes it easier to use. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| --- | ||
| title: Guides | ||
| description: In-depth guides for using Superset | ||
| --- | ||
|
|
||
| ## Guides | ||
|
|
||
| This section contains detailed guides for using Superset effectively. | ||
|
|
||
| More guides coming soon! |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| --- | ||
| title: Installation | ||
| description: Install Superset on your machine | ||
| --- | ||
|
|
||
| ## Download for macOS | ||
|
|
||
| Get started by downloading Superset for Apple Silicon: | ||
|
|
||
| <DownloadButton /> | ||
|
|
||
| ## Other Platforms | ||
|
|
||
| ### Windows & Linux | ||
|
|
||
| Windows and Linux support is coming soon. Join our waitlist to be notified when it's available. | ||
|
|
||
| ### Build from Source | ||
|
|
||
| You can also build Superset from source on any platform: | ||
|
|
||
| ```bash | ||
| git clone https://github.com/superset-sh/superset.git | ||
| cd superset | ||
| bun install | ||
| bun run build | ||
| ``` | ||
|
|
||
| See our [GitHub repository](https://github.com/superset-sh/superset) for more details. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| { | ||
| "title": "Documentation", | ||
| "pages": [ | ||
| "---Get Started---", | ||
| "quick-start", | ||
| "overview", | ||
| "installation", | ||
| "---Core Features---", | ||
| "core-features", | ||
| "---How to Guides---", | ||
| "guides" | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| --- | ||
| title: Overview | ||
| description: Learn what Superset is and how it works | ||
| --- | ||
|
|
||
| ## What is Superset? | ||
|
|
||
| Superset is a desktop application that helps developers work more efficiently with their codebase. It combines workspace management, terminal integration, and team collaboration into a single unified experience. | ||
|
|
||
| ## Key Features | ||
|
|
||
| ### Workspace Management | ||
|
|
||
| Organize your projects using git worktrees. Superset makes it easy to: | ||
|
|
||
| - Create and manage multiple worktrees for the same repository | ||
| - Switch between branches without stashing changes | ||
| - Keep your work organized across features and fixes | ||
|
|
||
| ### Terminal Integration | ||
|
|
||
| Built-in terminal with powerful session management: | ||
|
|
||
| - Multiple terminal sessions per workspace | ||
| - Persistent sessions that survive restarts | ||
| - Quick access to common commands | ||
|
|
||
| ### Team Collaboration | ||
|
|
||
| Work together with your team seamlessly: | ||
|
|
||
| - Share workspaces with team members | ||
| - Sync configurations across devices | ||
| - Manage team permissions and access | ||
|
|
||
| ## How It Works | ||
|
|
||
| Superset sits on top of your existing git workflow and enhances it with a visual interface and productivity tools. It doesn't replace git—it makes it easier to use. | ||
|
|
||
| ### Git Worktrees | ||
|
|
||
| Instead of switching branches in a single directory, Superset uses git worktrees to give each branch its own directory. This means: | ||
|
|
||
| - No more stashing uncommitted changes | ||
| - Run multiple branches simultaneously | ||
| - Keep your IDE state intact when switching contexts | ||
|
|
||
| ### Local-First Architecture | ||
|
|
||
| Your data stays on your machine. Superset works offline and syncs when you're connected. | ||
|
|
||
| ## Tech Stack | ||
|
|
||
| Superset is built with modern technologies: | ||
|
|
||
| - **Electron** - Cross-platform desktop framework | ||
| - **React** - UI components with TypeScript | ||
| - **SQLite** - Local database for fast queries | ||
| - **Git** - Version control integration |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| --- | ||
| title: Quick Start | ||
| description: Get up and running with Superset in minutes | ||
| --- | ||
|
|
||
| ## Quick Start | ||
|
|
||
| Get started with Superset in just a few steps: | ||
|
|
||
| 1. **Download Superset** - Get the app for your platform | ||
| 2. **Sign in** - Create an account or sign in | ||
| 3. **Create a workspace** - Set up your first project | ||
| 4. **Start working** - You're ready to go! | ||
|
|
||
| <DownloadButton /> | ||
|
|
||
| ## Next Steps | ||
|
|
||
| <Cards> | ||
| <Card title="Overview" href="/docs/overview" /> | ||
| <Card title="Installation" href="/docs/installation" /> | ||
| </Cards> |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| import { withSentryConfig } from "@sentry/nextjs"; | ||
| import { createMDX } from "fumadocs-mdx/next"; | ||
|
|
||
| const withMDX = createMDX(); | ||
|
|
||
| /** @type {import('next').NextConfig} */ | ||
| const config = { | ||
| reactStrictMode: true, | ||
| async redirects() { | ||
| return [ | ||
| { | ||
| source: "/", | ||
| destination: "/docs/quick-start", | ||
| permanent: false, | ||
| }, | ||
| { | ||
| source: "/docs", | ||
| destination: "/docs/quick-start", | ||
| permanent: false, | ||
| }, | ||
| ]; | ||
| }, | ||
| async rewrites() { | ||
| return [ | ||
| // Fumadocs MDX rewrites | ||
| { | ||
| source: "/docs/:path*.mdx", | ||
| destination: "/llms.mdx/docs/:path*", | ||
| }, | ||
| // PostHog rewrites | ||
| { | ||
| source: "/ingest/static/:path*", | ||
| destination: "https://us-assets.i.posthog.com/static/:path*", | ||
| }, | ||
| { | ||
| source: "/ingest/:path*", | ||
| destination: "https://us.i.posthog.com/:path*", | ||
| }, | ||
| { | ||
| source: "/ingest/decide", | ||
| destination: "https://us.i.posthog.com/decide", | ||
| }, | ||
| ]; | ||
|
Comment on lines
+31
to
+43
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rewrite ordering may cause The Consider reordering to place more specific routes first: ♻️ Suggested reorder // PostHog rewrites
{
source: "/ingest/static/:path*",
destination: "https://us-assets.i.posthog.com/static/:path*",
},
+ {
+ source: "/ingest/decide",
+ destination: "https://us.i.posthog.com/decide",
+ },
{
source: "/ingest/:path*",
destination: "https://us.i.posthog.com/:path*",
},
- {
- source: "/ingest/decide",
- destination: "https://us.i.posthog.com/decide",
- },🤖 Prompt for AI Agents |
||
| }, | ||
| skipTrailingSlashRedirect: true, | ||
| }; | ||
|
|
||
| export default withSentryConfig(withMDX(config), { | ||
| org: "superset-sh", | ||
| project: "docs", | ||
| silent: !process.env.CI, | ||
| widenClientFileUpload: true, | ||
| tunnelRoute: "/monitoring", | ||
| }); | ||
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
fumadocs llms.txt LLM text configuration nextjs rewrite💡 Result:
Yes — Fumadocs already includes patterns for producing an LLM-friendly llms.txt (and per-page .mdx endpoints) and shows how to wire Next.js rewrites to expose them.
Quick steps (minimal):
Create a getLLMText helper that returns page content (uses page.data.getText('processed')). See Fumadocs example. [1]
Expose a site-wide llms file route (cached, returns joined pages) — e.g. app/llms-full.txt/route.ts that collects source.getPages().map(getLLMText) and returns a Response. This produces /llms-full.txt for AI crawlers. [1]
Expose per-page Markdown via a dynamic route (app/llms.mdx/[[...slug]]/route.ts) that returns getLLMText(page) with Content-Type: text/markdown and generateStaticParams. [1]
Add Next.js rewrites so clean URLs map to those handlers. Example next.config.ts rewrites:
Example rewrite snippet:
async rewrites() {
return [
{ source: '/docs/:path*.mdx', destination: '/llms.mdx/:path*' },
{ source: '/llms.txt', destination: '/api/llms.txt' }, // or public/llms.txt
];
}
(place in next.config.ts). [1][3]
References:
If you want, I can: generate the exact route files + getLLMText code for your Fumadocs project (Next.js App Router) or produce a ready-to-drop next.config.ts — which would you prefer?
Fix the MDX rewrite destination path to match fumadocs' recommended pattern.
The destination
/llms.mdx/docs/:path*includes an extra/docs/segment. According to fumadocs documentation, this rewrite should map to/llms.mdx/:path*instead, so the route handler atapp/llms.mdx/[[...slug]]/route.tscan properly serve the LLM text content.🤖 Prompt for AI Agents