Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"lucide-static": "^1.7.0",
"react": "^19.2.4",
"react-dom": "^19.2.4",
"swr": "^2.4.1",
"tailwind-merge": "^3.5.0",
"vite": "^8.0.3"
},
Expand Down
1 change: 0 additions & 1 deletion src/lib/layout.shared.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,5 @@ export function baseOptions(): BaseLayoutProps {
),
transparentMode: "top",
},
githubUrl: "https://github.com/OrcaCD/orca-cd",
};
}
2 changes: 1 addition & 1 deletion src/routes/docs/$.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function Page() {
const { path, pageTree, markdownUrl } = useFumadocsLoader(Route.useLoaderData());

return (
<DocsLayout {...baseOptions()} tree={pageTree}>
<DocsLayout {...baseOptions()} tree={pageTree} githubUrl="https://github.com/OrcaCD/orca-cd">
<Suspense>{clientLoader.useContent(path, { markdownUrl, path })}</Suspense>
</DocsLayout>
);
Expand Down
27 changes: 27 additions & 0 deletions src/routes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ import {
NavbarMenuLink,
NavbarMenuTrigger,
} from "fumadocs-ui/layouts/home/navbar";
import { GithubInfo } from "fumadocs-ui/components/github-info";
import useSWR from "swr";

export const Route = createFileRoute("/")({
component: Home,
Expand Down Expand Up @@ -68,6 +70,12 @@ function SmallFeature({
}

function Home() {
const { data, isLoading } = useSWR(
"https://api.github.com/repos/OrcaCD/orca-cd/releases/latest",
// oxlint-disable-next-line promise/prefer-await-to-then
(...args) => fetch(...args).then((res) => res.json()),
);

return (
<HomeLayout
{...baseOptions()}
Expand Down Expand Up @@ -124,6 +132,25 @@ function Home() {
</NavbarMenu>
),
},
{
type: "custom",
secondary: true,
children: (
<a
href="https://github.com/OrcaCD/orca-cd/releases"
target="_blank"
rel="noopener noreferrer"
className="inline-flex items-center rounded-md border border-fd-border bg-fd-card px-1 py-0.5 text-sm text-fd-muted-foreground transition-colors hover:bg-fd-accent"
>
{isLoading ? "..." : (data.tag_name ?? "No release yet")}
</a>
),
},
{
type: "custom",
secondary: true,
children: <GithubInfo owner="OrcaCD" repo="orca-cd" className="flex-row" />,
},
]}
>
<section className="relative overflow-hidden border-b border-fd-border">
Expand Down