Skip to content
Open
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
2 changes: 1 addition & 1 deletion apps/developer-hub/content/docs/meta.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"pages": ["price-feeds"]
"pages": ["price-feeds", "express-relay", "entropy"]
}
14 changes: 1 addition & 13 deletions apps/developer-hub/src/app/(docs)/[section]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,7 @@ import type { ReactNode } from "react";

import { docsOptions } from "../../../config/layout.config";

export default async function Layout({
children,
...props
}: {
children: ReactNode;
params: Promise<{ section: string }>;
}) {
const params = await props.params;
export default function Layout({ children }: { children: ReactNode }) {
const options = { ...docsOptions };
options.sidebar = {
...options.sidebar,
// {} (empty object) means true
tabs: params.section === "price-feeds" ? {} : false,
};
return <DocsLayout {...options}>{children}</DocsLayout>;
}
1 change: 0 additions & 1 deletion apps/developer-hub/src/app/price-feeds/page.tsx

This file was deleted.

4 changes: 2 additions & 2 deletions apps/developer-hub/src/components/Root/global.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import "tailwindcss";
@import "fumadocs-ui/css/neutral.css";
@import "fumadocs-ui/css/preset.css";
@import "./theme.css";
@import "./fumadocs-global-style-overrides.css";
@import "./theme.css"; /*this overrides the default colors to match the pyth branding */
/* @import "./fumadocs-global-style-overrides.css"; */
49 changes: 21 additions & 28 deletions apps/developer-hub/src/components/Root/index.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
import { AppBody, AppShellRoot } from "@pythnetwork/component-library/AppShell";
import { RootProviders } from "@pythnetwork/component-library/AppShell";
import { RootProvider as FumadocsRootProvider } from "fumadocs-ui/provider";
import { NuqsAdapter } from "nuqs/adapters/next/app";
import type { ReactNode } from "react";

import {
AMPLITUDE_API_KEY,
ENABLE_ACCESSIBILITY_REPORTING,
GOOGLE_ANALYTICS_ID,
} from "../../config/server";
import { SearchButton } from "../search-button";

import "./global.css";

export const TABS = [
Expand All @@ -24,21 +17,19 @@ type Props = {
};

export const Root = ({ children }: Props) => (
<AppShellRoot
amplitudeApiKey={AMPLITUDE_API_KEY}
googleAnalyticsId={GOOGLE_ANALYTICS_ID}
enableAccessibilityReporting={ENABLE_ACCESSIBILITY_REPORTING}
providers={[NuqsAdapter]}
>
<FumadocsRootProvider
search={{
enabled: true,
options: {
api: "/api/search",
},
}}
>
<AppBody
<html lang="en">
<body>
<RootProviders providers={[NuqsAdapter]}>
<FumadocsRootProvider
search={{
enabled: true,
options: {
api: "/api/search",
},
}}
>
{/* commenting out the app body because we don't have the app shell anymore
<AppBody
appName="Developer Hub"
displaySupportButton={false}
extraCta={<SearchButton />}
Expand All @@ -47,9 +38,11 @@ export const Root = ({ children }: Props) => (
href: "https://dev-forum.pyth.network/",
}}
tabs={TABS}
>
{children}
</AppBody>
</FumadocsRootProvider>
</AppShellRoot>
> */}
{children}
{/* </AppBody> */}
</FumadocsRootProvider>
</RootProviders>
</body>
</html>
);
25 changes: 17 additions & 8 deletions apps/developer-hub/src/config/layout.config.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Logo } from "@pythnetwork/component-library/Header";
import type { DocsLayoutProps } from "fumadocs-ui/layouts/docs";
import type { BaseLayoutProps } from "fumadocs-ui/layouts/shared";

Expand All @@ -6,20 +7,28 @@ import { source } from "../lib/source";
export const baseOptions: BaseLayoutProps = {
nav: {
enabled: true,
title: (
<>
<Logo width="1em" height="1em" />
Developer Hub
</>
),
},
themeSwitch: {
enabled: false, // Keep this false as the theme switch is handled by the component library
},
searchToggle: {
enabled: false,
},
// these are commented out because we don't have the app shell anymore
// themeSwitch: {
// enabled: false, // Keep this false as the theme switch is handled by the component library
// },
// searchToggle: {
// enabled: false,
// },
};

export const docsOptions: DocsLayoutProps = {
...baseOptions,
tree: source.pageTree,
sidebar: {
tabs: false,
collapsible: false,
// these are commented out because we don't have the app shell anymore
// tabs: false,
// collapsible: false,
},
};
4 changes: 4 additions & 0 deletions packages/component-library/src/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ import { Card } from "../Card/index.jsx";
import { Link } from "../Link/index.jsx";
import type { Link as UnstyledLink } from "../unstyled/Link/index.jsx";

export { default as Logo } from "./logo.svg";

type Props = ComponentProps<"header"> & {
appName: string;
mainCta?:
Expand Down Expand Up @@ -239,3 +241,5 @@ export const SupportDrawer = {
</>
),
};

export { default as HeaderLogo } from "./logo.svg";
Loading