-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
200 additions
and
56 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,30 @@ | ||
import { DocContent } from "@/components/mdx/docs"; | ||
|
||
export const metadata = { | ||
title: "Connect to Turso using LibSQL Studio - The Best GUI Client for Turso", | ||
}; | ||
|
||
<DocContent title="Connect to Turso" group="Connecting"> | ||
|
||
LibSQL Studio is an excellent GUI for working with the Turso database. Here is | ||
a step-by-step guide on how to connect your Turso database using LibSQL | ||
Studio. | ||
|
||
## Generate Token | ||
|
||
To connect to the Turso database, you need to generate a database token. Follow these steps via the Turso dashboard: | ||
|
||
1. Go to the Turso Database section. | ||
2. Navigate to the Database menu. | ||
3. Click on **"Get Token"** on the right side of the database you want to connect. | ||
4. Click **"Generate Token"** and then copy the token. | ||
|
||
## Connect | ||
|
||
Open LibSQL Studio | ||
|
||
1. Click **"New Connection"** and choose **"Turso"**. | ||
2. Enter your database URL and the token you generated earlier. | ||
3. Click **"Connect."** | ||
|
||
</DocContent> |
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,45 @@ | ||
import { DocLayout } from "@/components/mdx/docs"; | ||
|
||
const TableContent = [ | ||
{ | ||
title: "LibSQL Studio", | ||
}, | ||
{ | ||
title: "Connecting", | ||
sub: [ | ||
{ | ||
title: "Connect to Turso", | ||
href: "/docs/connect-turso", | ||
}, | ||
{ | ||
title: "Connect to rqlite", | ||
href: "/learn/sqlite/introduction", | ||
}, | ||
{ | ||
title: "Connect to Valtown", | ||
href: "/learn/sqlite/introduction", | ||
}, | ||
], | ||
}, | ||
{ | ||
title: "Other", | ||
sub: [ | ||
{ | ||
title: "Self Hosting", | ||
href: "/learn/sqlite/indexing", | ||
}, | ||
{ | ||
title: "Temporary Session", | ||
href: "/docs/temporary-session", | ||
}, | ||
], | ||
}, | ||
]; | ||
|
||
export default function MdxLayout({ children }: { children: React.ReactNode }) { | ||
return ( | ||
<DocLayout content={TableContent} title="Document"> | ||
{children} | ||
</DocLayout> | ||
); | ||
} |
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 @@ | ||
This is MDX |
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,11 @@ | ||
import { DocContent } from "@/components/mdx/docs"; | ||
|
||
export const metadata = { | ||
title: "", | ||
}; | ||
|
||
<DocContent title="Temporary Session" group="Other"> | ||
|
||
Blank Page | ||
|
||
</DocContent> |
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 |
---|---|---|
@@ -0,0 +1,73 @@ | ||
"use client"; | ||
import { cn } from "@/lib/utils"; | ||
import Link from "next/link"; | ||
import { Sheet, SheetContent, SheetTrigger } from "../ui/sheet"; | ||
import { LucideAlignJustify } from "lucide-react"; | ||
import { usePathname } from "next/navigation"; | ||
import { DocTableContent } from "./docs"; | ||
|
||
export function DocNavigation({ | ||
content, | ||
title, | ||
}: { | ||
content: DocTableContent; | ||
title?: string; | ||
}) { | ||
"use client"; | ||
|
||
const pathname = usePathname(); | ||
|
||
const sideMenu = ( | ||
<div className="flex flex-col gap-2 p-4 text-sm"> | ||
{content.map((contentGroup) => { | ||
return ( | ||
<div key={contentGroup.title}> | ||
<div>{contentGroup.title}</div> | ||
{contentGroup.sub && ( | ||
<ul className="my-1"> | ||
{contentGroup.sub.map((content) => { | ||
return ( | ||
<li | ||
key={content.title} | ||
className={cn( | ||
"border-l border-gray-200 pl-4 py-1.5", | ||
pathname === content.href ? "font-bold" : "" | ||
)} | ||
> | ||
<Link href={content.href ?? ""}>{content.title}</Link> | ||
</li> | ||
); | ||
})} | ||
</ul> | ||
)} | ||
</div> | ||
); | ||
})} | ||
</div> | ||
); | ||
|
||
return ( | ||
<> | ||
<div className="hidden md:block fixed left-0 top-0 bottom-0 w-[300px] border-r overflow-y-auto"> | ||
<div className="p-4 border-b"> | ||
<div className="text-sm"> | ||
LibSQL<strong>Studio</strong> | ||
</div> | ||
<div className="text-xl font-semibold">{title}</div> | ||
</div> | ||
{sideMenu} | ||
</div> | ||
<div className="md:hidden p-2 border-b flex"> | ||
<div className="flex-grow px-2 font-bold">{title}</div> | ||
<Sheet> | ||
<SheetTrigger> | ||
<div className="px-2"> | ||
<LucideAlignJustify /> | ||
</div> | ||
</SheetTrigger> | ||
<SheetContent className="px-0">{sideMenu}</SheetContent> | ||
</Sheet> | ||
</div> | ||
</> | ||
); | ||
} |
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