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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ OpenKnowledge is a beautiful, local-first markdown editor and LLM wiki with inte
style="border-radius: 10px"
/>

Available as [macOS app](https://github.com/inkeep/open-knowledge/releases/latest/download/Open-Knowledge-arm64.dmg) or [Web app/CLI](https://openknowledge.ai/docs/get-started/quickstart#ok-install-web-app-linux-intel-mac) for Linux, Windows, Intel Mac.
Available as [macOS app](https://github.com/inkeep/open-knowledge/releases/latest/download/Open-Knowledge-arm64.dmg) or [Web app/CLI](https://openknowledge.ai/docs/get-started/quickstart#ok-install-web-app-linux-windows-intel-mac) for Linux, Windows, Intel Mac.

# Features

Expand Down
2 changes: 1 addition & 1 deletion docs/content/get-started/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Quickstart
description: Set up your agent-maintained knowledge base in less than five minutes.
---
<Tabs groupId="ok-install" persist className="ok-flush-tabs" items={['macOS app', 'Web app (Linux · Intel Mac)']}>
<Tabs groupId="ok-install" persist className="ok-flush-tabs" items={['macOS app', 'Web app (Linux, Windows, Intel Mac)']}>

<Tab>

Expand Down
26 changes: 25 additions & 1 deletion docs/scripts/validate-link.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,27 @@
import { getTableOfContents } from 'fumadocs-core/content/toc';
import { getSlugs } from 'fumadocs-core/source';
import { printErrors, readFiles, scanURLs, validateFiles } from 'next-validate-link';
import { composeTabId } from '../src/components/tabs';

const TABS_OPEN_TAG = /<Tabs\b([^>]*)>/g;
const GROUP_ID_ATTR = /groupId=["']([^"']+)["']/;
const ITEMS_ATTR = /items=\{\[(.*?)\]\}/s;
const STRING_LITERAL = /(['"])(.*?)\1/g;

function tabHashes(content: string): string[] {
const hashes: string[] = [];
for (const tag of content.matchAll(TABS_OPEN_TAG)) {
const attrs = tag[1] ?? '';
const groupId = attrs.match(GROUP_ID_ATTR)?.[1];
const items = attrs.match(ITEMS_ATTR)?.[1];
if (!items) continue;
for (const literal of items.matchAll(STRING_LITERAL)) {
const id = composeTabId(literal[2], groupId);
if (id) hashes.push(id);
}
}
return hashes;
}

async function checkLinks() {
const docsFiles = await readFiles(['content/**/*.{md,mdx}']);
Expand All @@ -10,7 +31,10 @@ async function checkLinks() {
'docs/[...slug]': docsFiles.map((file) => {
return {
value: getSlugs(file.path.replace(/^content\//, '')),
hashes: getTableOfContents(file.content).map((item) => item.url.slice(1)),
hashes: [
...getTableOfContents(file.content).map((item) => item.url.slice(1)),
...tabHashes(file.content),
],
};
}),
},
Expand Down
2 changes: 1 addition & 1 deletion docs/src/app/(home)/sections/call-to-action.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export function CallToAction() {
Download for macOS
</MarketingButton>
<Link
href="/docs/get-started/quickstart#ok-install-web-app-linux-intel-mac"
href="/docs/get-started/quickstart#ok-install-web-app-linux-windows-intel-mac"
className="font-mono text-base text-slide-muted underline-offset-4 transition-colors hover:text-slide-text hover:underline"
>
or CLI
Expand Down
2 changes: 1 addition & 1 deletion docs/src/app/(home)/sections/hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export function Hero() {
Download for macOS
</MarketingButton>
<Link
href="/docs/get-started/quickstart#ok-install-web-app-linux-intel-mac"
href="/docs/get-started/quickstart#ok-install-web-app-linux-windows-intel-mac"
className="font-mono text-sm text-slide-muted underline-offset-4 transition-colors hover:text-slide-text hover:underline"
>
or CLI
Expand Down
2 changes: 1 addition & 1 deletion docs/src/components/mcp-install.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function McpInstall({ editor, children }: { editor: string; children?: Re
</li>
<li>
<strong>Web app / terminal</strong> (Linux, Intel Mac — see the{' '}
<a href="/docs/get-started/quickstart#ok-install-web-app-linux-intel-mac">
<a href="/docs/get-started/quickstart#ok-install-web-app-linux-windows-intel-mac">
web app guide
</a>
). Run <code>ok init</code> in your project: it registers the OpenKnowledge MCP server
Expand Down
4 changes: 2 additions & 2 deletions docs/src/components/tabs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ describe('slugifyTabId', () => {
describe('composeTabId (groupId-prefix URL composition)', () => {
test('groupId + label → prefixed slug (the docs quickstart shape)', () => {
expect(composeTabId('macOS app', 'ok-install')).toBe('ok-install-macos-app');
expect(composeTabId('Web app (Linux · Intel Mac)', 'ok-install')).toBe(
'ok-install-web-app-linux-intel-mac',
expect(composeTabId('Web app (Linux, Windows, Intel Mac)', 'ok-install')).toBe(
'ok-install-web-app-linux-windows-intel-mac',
);
});

Expand Down