From 10ace4c1e0b6c944b3fab23408b679cbead3b595 Mon Sep 17 00:00:00 2001 From: sarah <129242944+sarah-inkeep@users.noreply.github.com> Date: Tue, 30 Jun 2026 18:05:08 -0700 Subject: [PATCH] docs: add social links single source, sidebar CTAs, and brand theme (#2314) - Centralize GitHub/Discord/X URLs in site.ts; consume from footer, nav, JSON-LD metadata, and the search widget - Add docs sidebar Download + Star CTAs (live GitHub star count) beneath the search bar; order social footer icons GitHub, Discord, X - Map Fumadocs primary/ring tokens onto brand azure so docs links, active nav, focus rings, and the primary button read on-brand - Include docs content and nav icon updates GitOrigin-RevId: f703f2d6c41ada0ed7a73e7e55ed46163606a63a --- .../advanced/folders-and-templates.mdx | 1 + docs/content/features/agent-activity.mdx | 1 + docs/content/features/assets-and-embeds.mdx | 1 + docs/content/features/editor.mdx | 1 + docs/content/features/github-sync.mdx | 1 + docs/content/features/ignore-patterns.mdx | 1 + docs/content/features/share.mdx | 1 + .../features/timeline-and-recovery.mdx | 1 + docs/content/get-started/obsidian.mdx | 1 + docs/content/get-started/overview.mdx | 1 + docs/content/get-started/quickstart.mdx | 1 + docs/content/integrations/claude-code.mdx | 1 + docs/content/integrations/codex.mdx | 1 + docs/content/integrations/cursor.mdx | 1 + docs/content/integrations/opencode.mdx | 1 + docs/content/reference/cli.mdx | 1 + docs/content/reference/configuration.mdx | 1 + docs/content/reference/core-concepts.md | 1 + docs/content/reference/mcp.mdx | 1 + docs/content/workflows/entity-vault.mdx | 1 + docs/content/workflows/karpathy-llm-wiki.mdx | 1 + .../supporting-open-knowledge-format.mdx | 1 + docs/src/app/(home)/footer.tsx | 7 +-- docs/src/app/(home)/page.tsx | 4 +- docs/src/app/(home)/site-nav.tsx | 8 ++-- docs/src/app/docs/layout.tsx | 10 +++- docs/src/app/global.css | 16 +++++++ docs/src/app/layout.tsx | 4 +- docs/src/components/docs-sidebar-cta.tsx | 48 +++++++++++++++++++ .../src/components/docs-sidebar-separator.tsx | 12 +++++ docs/src/components/icons/brand.ts | 20 ++++++++ docs/src/components/icons/mcp.tsx | 25 ++++++++++ docs/src/components/icons/obsidian.tsx | 34 +++++++++++++ .../src/components/inkeep-search-and-chat.tsx | 4 +- docs/src/lib/layout.shared.tsx | 31 +++++++++++- docs/src/lib/site.ts | 4 ++ docs/src/lib/source.ts | 8 ++++ 37 files changed, 243 insertions(+), 14 deletions(-) create mode 100644 docs/src/components/docs-sidebar-cta.tsx create mode 100644 docs/src/components/docs-sidebar-separator.tsx create mode 100644 docs/src/components/icons/brand.ts create mode 100644 docs/src/components/icons/mcp.tsx create mode 100644 docs/src/components/icons/obsidian.tsx diff --git a/docs/content/advanced/folders-and-templates.mdx b/docs/content/advanced/folders-and-templates.mdx index cf7c5cd54..1da283632 100644 --- a/docs/content/advanced/folders-and-templates.mdx +++ b/docs/content/advanced/folders-and-templates.mdx @@ -1,5 +1,6 @@ --- title: Folders and templates +icon: LuFolderTree description: Describe a folder with its own properties, and offer reusable templates that give new documents their starting content and properties. --- diff --git a/docs/content/features/agent-activity.mdx b/docs/content/features/agent-activity.mdx index 75c6a912c..38da3ec6c 100644 --- a/docs/content/features/agent-activity.mdx +++ b/docs/content/features/agent-activity.mdx @@ -1,5 +1,6 @@ --- title: Agent activity +icon: LuActivity description: See every file an agent edits in a session, with per-edit diffs and selective rollback. --- diff --git a/docs/content/features/assets-and-embeds.mdx b/docs/content/features/assets-and-embeds.mdx index 48f455726..a4e0a33a2 100644 --- a/docs/content/features/assets-and-embeds.mdx +++ b/docs/content/features/assets-and-embeds.mdx @@ -1,5 +1,6 @@ --- title: Assets and embeds +icon: LuPaperclip description: Drop files into the editor and reference them with wiki-style embeds. --- diff --git a/docs/content/features/editor.mdx b/docs/content/features/editor.mdx index a39ea485e..61cb9cb30 100644 --- a/docs/content/features/editor.mdx +++ b/docs/content/features/editor.mdx @@ -1,5 +1,6 @@ --- title: Editor +icon: LuPenLine description: The OpenKnowledge editor. WYSIWYG markdown, source toggle, content blocks, inline frontmatter, and the file sidebar. --- The editor is where you read, write, and collaborate on your docs, and where AI agents land when they edit. WYSIWYG by default with a source-mode toggle, a frontmatter properties pane, real-time CRDT collaboration, and a file sidebar that organizes the project. diff --git a/docs/content/features/github-sync.mdx b/docs/content/features/github-sync.mdx index fe0f54927..a1b8b30ac 100644 --- a/docs/content/features/github-sync.mdx +++ b/docs/content/features/github-sync.mdx @@ -1,5 +1,6 @@ --- title: GitHub sync +icon: custom/GitHub description: Clone repos from GitHub, auto-sync changes with your team, and resolve conflicts. --- OpenKnowledge can connect a project to a GitHub remote repository and keep it synced over time. When GitHub sync is enabled, OpenKnowledge actively pulls commits from the remote and pushes commits back. diff --git a/docs/content/features/ignore-patterns.mdx b/docs/content/features/ignore-patterns.mdx index 03e4bba7b..f89bb9040 100644 --- a/docs/content/features/ignore-patterns.mdx +++ b/docs/content/features/ignore-patterns.mdx @@ -1,5 +1,6 @@ --- title: Ignore patterns +icon: LuEyeOff description: Hide files and folders from the editor, search, and your AI agents. --- diff --git a/docs/content/features/share.mdx b/docs/content/features/share.mdx index 07b493e67..b48516987 100644 --- a/docs/content/features/share.mdx +++ b/docs/content/features/share.mdx @@ -1,5 +1,6 @@ --- title: Share links +icon: LuShare2 description: Copy a link to any doc or folder and send it to a teammate. OpenKnowledge handles the GitHub round-trip, the deep link, and the branch on the other end. --- diff --git a/docs/content/features/timeline-and-recovery.mdx b/docs/content/features/timeline-and-recovery.mdx index 6707f6e1b..b470f075b 100644 --- a/docs/content/features/timeline-and-recovery.mdx +++ b/docs/content/features/timeline-and-recovery.mdx @@ -1,5 +1,6 @@ --- title: Timeline and recovery +icon: LuHistory description: Review the edit history for the open document, including agent, human, upstream sync, and file system changes, with inline diffs and version restore. --- diff --git a/docs/content/get-started/obsidian.mdx b/docs/content/get-started/obsidian.mdx index 8d2cf6471..6ed9d3486 100644 --- a/docs/content/get-started/obsidian.mdx +++ b/docs/content/get-started/obsidian.mdx @@ -1,5 +1,6 @@ --- title: Using with Obsidian +icon: custom/Obsidian description: How to open an existing Obsidian vault in OpenKnowledge, which markdown syntax carries over, and where the two differ. --- diff --git a/docs/content/get-started/overview.mdx b/docs/content/get-started/overview.mdx index e71bf79e0..7ae0ef7b2 100644 --- a/docs/content/get-started/overview.mdx +++ b/docs/content/get-started/overview.mdx @@ -1,5 +1,6 @@ --- title: Overview +icon: LuBookOpen description: Beautiful, AI-native markdown editor. footer: false --- diff --git a/docs/content/get-started/quickstart.mdx b/docs/content/get-started/quickstart.mdx index fdc568129..394fbf5e0 100644 --- a/docs/content/get-started/quickstart.mdx +++ b/docs/content/get-started/quickstart.mdx @@ -1,5 +1,6 @@ --- title: Quickstart +icon: LuZap description: Set up your agent-maintained knowledge base in less than five minutes. --- diff --git a/docs/content/integrations/claude-code.mdx b/docs/content/integrations/claude-code.mdx index f4b3a056f..7d3464513 100644 --- a/docs/content/integrations/claude-code.mdx +++ b/docs/content/integrations/claude-code.mdx @@ -1,6 +1,7 @@ --- title: Claude description: Use OpenKnowledge with Claude Code, in the CLI or the Claude Desktop app. +icon: custom/Claude --- OpenKnowledge works with Claude Code through MCP plus an installed skill that teaches the agent how to use the tools. Both surfaces are supported: diff --git a/docs/content/integrations/codex.mdx b/docs/content/integrations/codex.mdx index 2f7e45afa..7deafed6b 100644 --- a/docs/content/integrations/codex.mdx +++ b/docs/content/integrations/codex.mdx @@ -1,6 +1,7 @@ --- title: Codex description: Use OpenKnowledge with OpenAI Codex. +icon: custom/Codex --- OpenKnowledge plugs into Codex through MCP. diff --git a/docs/content/integrations/cursor.mdx b/docs/content/integrations/cursor.mdx index f688aa155..3bbd0d48b 100644 --- a/docs/content/integrations/cursor.mdx +++ b/docs/content/integrations/cursor.mdx @@ -1,6 +1,7 @@ --- title: Cursor description: Use OpenKnowledge with Cursor. +icon: custom/Cursor --- OpenKnowledge plugs into Cursor through MCP plus an installed skill that teaches the agent how to use the tools. diff --git a/docs/content/integrations/opencode.mdx b/docs/content/integrations/opencode.mdx index 672a6f263..94df821bd 100644 --- a/docs/content/integrations/opencode.mdx +++ b/docs/content/integrations/opencode.mdx @@ -1,6 +1,7 @@ --- title: OpenCode description: Use OpenKnowledge with OpenCode — including fully local models via Ollama, LM Studio, or any OpenAI-compatible endpoint. +icon: custom/OpenCode --- OpenKnowledge plugs into [OpenCode](https://opencode.ai) through MCP. OpenCode is a terminal-based coding agent that works with any model — cloud or fully local — so you can run an entirely local edit-your-knowledge-base loop. diff --git a/docs/content/reference/cli.mdx b/docs/content/reference/cli.mdx index 033755a73..85b33d164 100644 --- a/docs/content/reference/cli.mdx +++ b/docs/content/reference/cli.mdx @@ -1,5 +1,6 @@ --- title: CLI & web app +icon: LuTerminal description: Install the ok CLI and run the OpenKnowledge web app in your browser — on Linux or an Intel Mac. --- On macOS, use the [desktop app](/docs/get-started/quickstart) for the smoothest experience. On **Linux** or an **Intel Mac**, install the `ok` CLI from npm and run the **same editor as a local web app** in your browser. diff --git a/docs/content/reference/configuration.mdx b/docs/content/reference/configuration.mdx index 72b3f68a3..5e0b5f21e 100644 --- a/docs/content/reference/configuration.mdx +++ b/docs/content/reference/configuration.mdx @@ -1,5 +1,6 @@ --- title: Configuration +icon: LuSettings description: The .ok/config.yml schema and environment variables. --- diff --git a/docs/content/reference/core-concepts.md b/docs/content/reference/core-concepts.md index b7f0e6061..e8eb0aeca 100644 --- a/docs/content/reference/core-concepts.md +++ b/docs/content/reference/core-concepts.md @@ -1,5 +1,6 @@ --- title: Core Concepts +icon: LuLightbulb description: "How OpenKnowledge works: the three-layer model, the file system as the database, links and backlinks, the well-connected knowledge base, and attribution." --- diff --git a/docs/content/reference/mcp.mdx b/docs/content/reference/mcp.mdx index ec9dc554b..fb3c305f7 100644 --- a/docs/content/reference/mcp.mdx +++ b/docs/content/reference/mcp.mdx @@ -1,5 +1,6 @@ --- title: MCP +icon: custom/MCP description: Tools the OpenKnowledge MCP server exposes to AI agents. --- diff --git a/docs/content/workflows/entity-vault.mdx b/docs/content/workflows/entity-vault.mdx index 3d0f6c57b..4c2b4f28f 100644 --- a/docs/content/workflows/entity-vault.mdx +++ b/docs/content/workflows/entity-vault.mdx @@ -1,5 +1,6 @@ --- title: Entity vault (GBrain-compatible) workflow +icon: LuBoxes description: A GBrain-compatible Markdown workflow for people, companies, meetings, and concepts. OpenKnowledge is the cockpit/editor/review layer; Garry Tan's gbrain can import or sync the same vault for indexing and automation. --- diff --git a/docs/content/workflows/karpathy-llm-wiki.mdx b/docs/content/workflows/karpathy-llm-wiki.mdx index 1c9337047..6262b3c7e 100644 --- a/docs/content/workflows/karpathy-llm-wiki.mdx +++ b/docs/content/workflows/karpathy-llm-wiki.mdx @@ -1,5 +1,6 @@ --- title: Karpathy's LLM wiki workflow +icon: LuBrain description: Build a source-grounded knowledge base where an LLM agent curates the wiki from the raw material you feed it. Every claim traces back to a preserved source. Maps directly to the Knowledge base starter pack. --- diff --git a/docs/content/workflows/supporting-open-knowledge-format.mdx b/docs/content/workflows/supporting-open-knowledge-format.mdx index 745da5863..0fe2abc55 100644 --- a/docs/content/workflows/supporting-open-knowledge-format.mdx +++ b/docs/content/workflows/supporting-open-knowledge-format.mdx @@ -1,5 +1,6 @@ --- title: Supporting the Open Knowledge Format +icon: LuFileCode description: Scaffold a knowledge base that is conformant with Google's Open Knowledge Format (OKF) from the first commit — without enforcing anything. --- Open Knowledge ships a starter pack named **`okf`** that scaffolds a knowledge base **conformant with Google's [Open Knowledge Format (OKF)](https://github.com/GoogleCloudPlatform/knowledge-catalog/blob/main/okf/SPEC.md) from the first commit** — without enforcing anything. You get a portable, OKF-ready bundle out of the box, and you stay free to author however you like. diff --git a/docs/src/app/(home)/footer.tsx b/docs/src/app/(home)/footer.tsx index 68dee4eb3..746b6532e 100644 --- a/docs/src/app/(home)/footer.tsx +++ b/docs/src/app/(home)/footer.tsx @@ -4,12 +4,13 @@ import { GitHubIcon } from '@/components/icons/github'; import { XIcon } from '@/components/icons/x'; import { InkeepLogo } from '@/components/inkeep-logo'; import { SubscribeForm } from '@/components/subscribe-form'; +import { DISCORD_URL, GITHUB_URL, X_URL } from '@/lib/site'; import { DotTexture } from './dot-texture'; const socialLinks = [ - { href: 'https://github.com/inkeep/open-knowledge', label: 'GitHub', Icon: GitHubIcon }, - { href: 'https://discord.com/invite/YujKpFN49', label: 'Discord', Icon: DiscordIcon }, - { href: 'https://x.com/OpenKnowledgeAI', label: 'X', Icon: XIcon }, + { href: GITHUB_URL, label: 'GitHub', Icon: GitHubIcon }, + { href: DISCORD_URL, label: 'Discord', Icon: DiscordIcon }, + { href: X_URL, label: 'X', Icon: XIcon }, ]; const legalLinks = [ diff --git a/docs/src/app/(home)/page.tsx b/docs/src/app/(home)/page.tsx index 9bb03de3d..a75eac588 100644 --- a/docs/src/app/(home)/page.tsx +++ b/docs/src/app/(home)/page.tsx @@ -1,6 +1,6 @@ import type { SoftwareApplication, WithContext } from 'schema-dts'; import { JsonLd } from '@/components/seo/json-ld'; -import { DOWNLOAD_URL, SITE_DESCRIPTION, SITE_NAME, SITE_URL } from '@/lib/site'; +import { DOWNLOAD_URL, GITHUB_URL, SITE_DESCRIPTION, SITE_NAME, SITE_URL } from '@/lib/site'; import { SiteFooter } from './footer'; import { CallToAction } from './sections/call-to-action'; import { Collaboration } from './sections/collaboration'; @@ -30,7 +30,7 @@ const softwareAppLd = { name: 'Inkeep', url: 'https://inkeep.com', }, - sameAs: 'https://github.com/inkeep/open-knowledge', + sameAs: GITHUB_URL, } satisfies WithContext; export default function HomePage() { diff --git a/docs/src/app/(home)/site-nav.tsx b/docs/src/app/(home)/site-nav.tsx index b173bc770..b7b883283 100644 --- a/docs/src/app/(home)/site-nav.tsx +++ b/docs/src/app/(home)/site-nav.tsx @@ -9,7 +9,7 @@ import { GitHubIcon } from '@/components/icons/github'; import { XIcon } from '@/components/icons/x'; import { OkWordmark } from '@/components/ok-wordmark'; import { Sheet, SheetClose, SheetContent, SheetTitle, SheetTrigger } from '@/components/ui/sheet'; -import { DOWNLOAD_ROUTE } from '@/lib/site'; +import { DISCORD_URL, DOWNLOAD_ROUTE, GITHUB_URL, X_URL } from '@/lib/site'; import { MarketingButton } from './marketing-button'; type NavLink = { @@ -32,14 +32,14 @@ const docsLink: NavLink = { const socialLinks: NavLink[] = [ { - href: 'https://x.com/OpenKnowledgeAI', + href: X_URL, label: 'X (Twitter)', external: true, icon: XIcon, iconOnly: true, }, { - href: 'https://discord.com/invite/YujKpFN49', + href: DISCORD_URL, label: 'Discord', external: true, icon: DiscordIcon, @@ -48,7 +48,7 @@ const socialLinks: NavLink[] = [ ]; const githubLink: NavLink = { - href: 'https://github.com/inkeep/open-knowledge', + href: GITHUB_URL, label: 'GitHub', external: true, icon: GitHubIcon, diff --git a/docs/src/app/docs/layout.tsx b/docs/src/app/docs/layout.tsx index 9fbb9abda..9f7acda00 100644 --- a/docs/src/app/docs/layout.tsx +++ b/docs/src/app/docs/layout.tsx @@ -1,11 +1,19 @@ +import { getGitHubStars } from '@inkeep/open-knowledge-core'; import { DocsLayout } from 'fumadocs-ui/layouts/docs'; +import { DocsSidebarCta } from '@/components/docs-sidebar-cta'; +import { DocsSidebarSeparator } from '@/components/docs-sidebar-separator'; import { baseOptions } from '@/lib/layout.shared'; import { source } from '@/lib/source'; -export default function Layout({ children }: LayoutProps<'/docs'>) { +export default async function Layout({ children }: LayoutProps<'/docs'>) { + const stars = await getGitHubStars({ next: { revalidate: 3600 } }); return ( , + components: { Separator: DocsSidebarSeparator }, + }} {...baseOptions({ wordmarkClassName: 'h-7 w-auto text-(--slide-text)' })} > {children} diff --git a/docs/src/app/global.css b/docs/src/app/global.css index 4f0972497..537a49aad 100644 --- a/docs/src/app/global.css +++ b/docs/src/app/global.css @@ -85,6 +85,22 @@ } } +/* Map Fumadocs' neutral primary/ring onto brand azure so docs links, active + nav, the primary button, and focus rings read on-brand rather than the + preset near-black. Deliberately UNLAYERED: neutral.css defines its dark + values in a plain (unlayered) `.dark {}` rule, and unlayered rules always + win over `@layer` ones — so a `@layer base` override would lose in dark mode + (falls through to the preset's #fafafa). Light hex matches --slide-accent / + azure-blue; dark is the lighter --slide-accent for legibility on the dark bg. */ +:root { + --color-fd-primary: #3784ff; + --color-fd-ring: #3784ff; +} +.dark { + --color-fd-primary: #69a3ff; + --color-fd-ring: #69a3ff; +} + .subtle-scrollbar { @apply scrollbar-thin scrollbar-track-transparent scrollbar-thumb-fd-muted-foreground/30 dark:scrollbar-thumb-fd-muted-foreground/50; } diff --git a/docs/src/app/layout.tsx b/docs/src/app/layout.tsx index cdb0e2e71..2f6439759 100644 --- a/docs/src/app/layout.tsx +++ b/docs/src/app/layout.tsx @@ -3,12 +3,14 @@ import { DM_Sans, Inter, JetBrains_Mono } from 'next/font/google'; import type { Organization, WebSite, WithContext } from 'schema-dts'; import { JsonLd } from '@/components/seo/json-ld'; import { + GITHUB_URL, metaDescription, SITE_DESCRIPTION, SITE_HEADLINE, SITE_NAME, SITE_URL, TWITTER_HANDLE, + X_URL, } from '@/lib/site'; import './global.css'; import { Provider } from './provider'; @@ -40,7 +42,7 @@ const orgLd = { description: 'Ship Agent-powered assistants and automations that boost customer experience and 10x your teams.', foundingDate: '2023', - sameAs: ['https://x.com/OpenKnowledgeAI', 'https://github.com/inkeep/open-knowledge'], + sameAs: [X_URL, GITHUB_URL], } satisfies WithContext; const siteLd = { diff --git a/docs/src/components/docs-sidebar-cta.tsx b/docs/src/components/docs-sidebar-cta.tsx new file mode 100644 index 000000000..5ba67fd2e --- /dev/null +++ b/docs/src/components/docs-sidebar-cta.tsx @@ -0,0 +1,48 @@ +import { buttonVariants } from 'fumadocs-ui/components/ui/button'; +import { Download } from 'lucide-react'; +import { GitHubIcon } from '@/components/icons/github'; +import { DOWNLOAD_ROUTE, GITHUB_URL } from '@/lib/site'; +import { cn } from '@/lib/utils'; + +const compactStars = new Intl.NumberFormat('en-US', { + notation: 'compact', + maximumFractionDigits: 1, +}); +const fullStars = new Intl.NumberFormat('en-US'); + +export function DocsSidebarCta({ stars }: { stars: number | null }) { + return ( +
+ {/* Raw , not next/link: DOWNLOAD_ROUTE is a 302 redirect handler, so + next/link would prefetch it (firing the redirect, inflating download + counts) and double-fetch on click. Mirrors DownloadButton. */} + + + + + Star + {stars != null ? ( + + {compactStars.format(stars)} + + ) : null} + +
+ ); +} diff --git a/docs/src/components/docs-sidebar-separator.tsx b/docs/src/components/docs-sidebar-separator.tsx new file mode 100644 index 000000000..a85e873ed --- /dev/null +++ b/docs/src/components/docs-sidebar-separator.tsx @@ -0,0 +1,12 @@ +'use client'; + +import type * as PageTree from 'fumadocs-core/page-tree'; + +export function DocsSidebarSeparator({ item }: { item: PageTree.Separator }) { + return ( +

+ {item.icon} + {item.name} +

+ ); +} diff --git a/docs/src/components/icons/brand.ts b/docs/src/components/icons/brand.ts new file mode 100644 index 000000000..62ba24211 --- /dev/null +++ b/docs/src/components/icons/brand.ts @@ -0,0 +1,20 @@ +import type { ComponentType, SVGProps } from 'react'; +import { ClaudeIcon } from './claude'; +import { CodexIcon } from './codex'; +import { CursorIcon } from './cursor'; +import { GitHubIcon } from './github'; +import { McpIcon } from './mcp'; +import { ObsidianIcon } from './obsidian'; +import { OpenCodeIcon } from './opencode'; + +export const brandIcons = { + Claude: ClaudeIcon, + Cursor: CursorIcon, + Codex: CodexIcon, + OpenCode: OpenCodeIcon, + GitHub: GitHubIcon, + Obsidian: ObsidianIcon, + MCP: McpIcon, +} as const satisfies Record>>; + +export type BrandIconName = keyof typeof brandIcons; diff --git a/docs/src/components/icons/mcp.tsx b/docs/src/components/icons/mcp.tsx new file mode 100644 index 000000000..dbc2317a1 --- /dev/null +++ b/docs/src/components/icons/mcp.tsx @@ -0,0 +1,25 @@ +import type { SVGProps } from 'react'; + +export function McpIcon(props: SVGProps) { + return ( + + MCP icon + + + + + ); +} diff --git a/docs/src/components/icons/obsidian.tsx b/docs/src/components/icons/obsidian.tsx new file mode 100644 index 000000000..8777d52d0 --- /dev/null +++ b/docs/src/components/icons/obsidian.tsx @@ -0,0 +1,34 @@ +import type { SVGProps } from 'react'; + +export function ObsidianIcon(props: SVGProps) { + return ( + + Obsidian icon + + + + + + ); +} diff --git a/docs/src/components/inkeep-search-and-chat.tsx b/docs/src/components/inkeep-search-and-chat.tsx index 3d9f4ceaf..1acc9dd81 100644 --- a/docs/src/components/inkeep-search-and-chat.tsx +++ b/docs/src/components/inkeep-search-and-chat.tsx @@ -8,7 +8,7 @@ import { import type { SharedProps } from 'fumadocs-ui/components/dialog/search'; import { usePathname } from 'next/navigation'; import type { FC } from 'react'; -import { SITE_URL } from '@/lib/site'; +import { GITHUB_URL, SITE_URL } from '@/lib/site'; const apiKey = process.env.NEXT_PUBLIC_INKEEP_API_KEY; @@ -81,7 +81,7 @@ const InkeepSearchAndChat: FC = ({ open, onOpenChange }) => { icon: { builtIn: 'FaGithub' }, action: { type: 'open_link', - url: 'https://github.com/inkeep/open-knowledge', + url: GITHUB_URL, }, }, ], diff --git a/docs/src/lib/layout.shared.tsx b/docs/src/lib/layout.shared.tsx index 6820d20a1..6cbe3cc3b 100644 --- a/docs/src/lib/layout.shared.tsx +++ b/docs/src/lib/layout.shared.tsx @@ -1,5 +1,9 @@ import type { BaseLayoutProps } from 'fumadocs-ui/layouts/shared'; +import { DiscordIcon } from '@/components/icons/discord'; +import { GitHubIcon } from '@/components/icons/github'; +import { XIcon } from '@/components/icons/x'; import { OkWordmark } from '@/components/ok-wordmark'; +import { DISCORD_URL, GITHUB_URL, X_URL } from '@/lib/site'; export function baseOptions({ wordmarkClassName = 'h-8 w-auto text-(--slide-text)', @@ -10,6 +14,31 @@ export function baseOptions({ nav: { title: , }, - githubUrl: 'https://github.com/inkeep/open-knowledge', + links: [ + { + type: 'icon', + url: GITHUB_URL, + label: 'GitHub', + text: 'GitHub', + icon: , + external: true, + }, + { + type: 'icon', + url: DISCORD_URL, + label: 'Discord', + text: 'Discord', + icon: , + external: true, + }, + { + type: 'icon', + url: X_URL, + label: 'X (Twitter)', + text: 'X', + icon: , + external: true, + }, + ], }; } diff --git a/docs/src/lib/site.ts b/docs/src/lib/site.ts index 74caf7136..4dcdefe92 100644 --- a/docs/src/lib/site.ts +++ b/docs/src/lib/site.ts @@ -3,6 +3,10 @@ import { STABLE_DMG_URL } from './download-links'; export const SITE_URL = 'https://openknowledge.ai'; export const SITE_NAME = 'OpenKnowledge'; export const TWITTER_HANDLE = '@OpenKnowledgeAI'; + +export const GITHUB_URL = 'https://github.com/inkeep/open-knowledge'; +export const DISCORD_URL = 'https://discord.com/invite/YujKpFN49'; +export const X_URL = `https://x.com/${TWITTER_HANDLE.slice(1)}`; export const SITE_DESCRIPTION = 'An agent-native knowledge platform where humans and AI co-create. Real-time CRDT editing, markdown-native, connected to any AI agent via MCP.'; diff --git a/docs/src/lib/source.ts b/docs/src/lib/source.ts index e8c9ef436..abb6c3986 100644 --- a/docs/src/lib/source.ts +++ b/docs/src/lib/source.ts @@ -1,6 +1,7 @@ import { loader } from 'fumadocs-core/source'; import { icons } from 'lucide-react'; import { createElement } from 'react'; +import { type BrandIconName, brandIcons } from '@/components/icons/brand'; import { docs } from '../../.source/server'; export const source = loader({ @@ -9,6 +10,13 @@ export const source = loader({ icon(iconName) { if (!iconName) return; + if (iconName.startsWith('custom/')) { + const key = iconName.slice('custom/'.length) as BrandIconName; + const Brand = brandIcons[key]; + if (Brand) return createElement(Brand); + throw new Error(`Unknown brand icon "${iconName}"`); + } + if (iconName.startsWith('Lu')) { const key = iconName.slice(2) as keyof typeof icons; const Icon = icons[key];