Skip to content

Commit

Permalink
astro starlight
Browse files Browse the repository at this point in the history
  • Loading branch information
RPDeshaies committed Dec 4, 2024
1 parent 6149985 commit 9350bca
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 41 deletions.
42 changes: 21 additions & 21 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import mdx from "@astrojs/mdx";
import netlify from "@astrojs/netlify";
import react from "@astrojs/react";
import sitemap from "@astrojs/sitemap";
import tailwind from "@astrojs/tailwind";
import { defineConfig } from "astro/config";
import { constants } from "./src/domains/utils/constants";

import netlify from "@astrojs/netlify";

import partytown from "@astrojs/partytown";

// https://astro.build/config
Expand All @@ -29,27 +28,28 @@ export default defineConfig({
forward: ["dataLayer.push"],
},
}),
// starlight({
// title: "Keeper Documentation",
// disable404Route: true,
// logo: {
// src: "./public/keeper/name.svg",
// replacesTitle: true,
// },
// sidebar: [
// {
// label: "Documentation",
// autogenerate: {
// directory: "docs",
//
// starlight({
// title: "Keeper Documentation",
// disable404Route: true,
// logo: {
// src: "./public/keeper/name.svg",
// replacesTitle: true,
// },
// sidebar: [
// {
// label: "Documentation",
// autogenerate: {
// directory: "docs",
// },
// },
// ],
// customCss: ["./src/styles/docs.css"],
// social: {
// discord: "https://farirpgs.com/discord",
// github: "https://github.com/farirpgs/keeper",
// },
// ],
// customCss: ["./src/styles/docs.css"],
// social: {
// discord: "https://farirpgs.com/discord",
// github: "https://github.com/farirpgs/keeper",
// },
// }),
// }),
],
experimental: {
contentIntellisense: true,
Expand Down
Binary file modified bun.lockb
Binary file not shown.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"@astrojs/mdx": "4.0.1",
"@astrojs/netlify": "6.0.0",
"@astrojs/partytown": "^2.1.2",
"@astrojs/starlight": "^0.29.2",
"@astrojs/react": "4.0.0",
"@astrojs/sitemap": "^3.2.1",
"@astrojs/tailwind": "5.1.3",
Expand Down
42 changes: 23 additions & 19 deletions src/components/server/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,22 +108,24 @@ export function Header(props: { theme?: ThemeType }) {
<Box className="hidden sm:inline-block">
<DiceRoller theme={props.theme} />
</Box>
<Tooltip content="Documentation">
<Button
radius="full"
size="3"
variant="ghost"
className="m-0 hidden md:inline-block"
style={{
fontFamily,
}}
asChild
>
<a href={AppUrl.docs()} aria-label="Documentation">
<ReaderIcon className="h-[24px] w-[24px]" />
</a>
</Button>
</Tooltip>
{false && (
<Tooltip content="Documentation">
<Button
radius="full"
size="3"
variant="ghost"
className="m-0 hidden md:inline-block"
style={{
fontFamily,
}}
asChild
>
<a href={AppUrl.docs()} aria-label="Documentation">
<ReaderIcon className="h-[24px] w-[24px]" />
</a>
</Button>
</Tooltip>
)}
<Tooltip content="Search">
<Button
radius="full"
Expand Down Expand Up @@ -212,9 +214,11 @@ export function Header(props: { theme?: ThemeType }) {
<Link href={AppUrl.dice()} color="gray">
Dice Roller
</Link>
<Link href={AppUrl.docs()} color="gray">
Documentation
</Link>
{false && (
<Link href={AppUrl.docs()} color="gray">
Documentation
</Link>
)}
<Link href={AppUrl.search({})} color="gray">
Search
</Link>
Expand Down
4 changes: 3 additions & 1 deletion src/content.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { docsSchema } from "@astrojs/starlight/schema";
import { glob } from "astro/loaders";
import { defineCollection, reference, z } from "astro:content";

import { Colors } from "./domains/colors/colors";

const themeSchema = z
Expand Down Expand Up @@ -75,5 +77,5 @@ export const collections = {
_locale: z.string().optional(),
}),
}),
// docs: defineCollection({ schema: docsSchema() }),
docs: defineCollection({ schema: docsSchema() }),
};

0 comments on commit 9350bca

Please sign in to comment.