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
13 changes: 0 additions & 13 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,6 @@ jobs:
with:
node-version: '20'

# Fetch the chat-widget from the landing-page repo (pre-built dist is committed)
- name: Fetch @futureagi/chat-widget
run: |
git clone --depth 1 \
https://x-access-token:${{ secrets.GH_PAT }}@github.com/future-agi/landing-page.git .landing-tmp
cp -r .landing-tmp/docs-agent/packages/chat-widget ./chat-widget
rm -rf .landing-tmp

# Replace workspace:* with local file reference so npm can install it
- name: Patch chat-widget dependency
run: |
sed -i 's|"@futureagi/chat-widget": "workspace:\*"|"@futureagi/chat-widget": "file:./chat-widget"|' package.json

- name: Cache npm dependencies
uses: actions/cache@v4
with:
Expand Down
23 changes: 2 additions & 21 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,8 @@ jobs:
with:
node-version: '20'

- name: Fetch @futureagi/chat-widget
run: |
git clone --depth 1 \
https://x-access-token:${{ secrets.GH_PAT }}@github.com/future-agi/landing-page.git .landing-tmp
cp -r .landing-tmp/docs-agent/packages/chat-widget ./chat-widget
rm -rf .landing-tmp

- name: Patch chat-widget dependency
run: |
sed -i 's|"@futureagi/chat-widget": "workspace:\*"|"@futureagi/chat-widget": "file:./chat-widget"|' package.json

- name: Cache npm dependencies
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json', 'package.json') }}
restore-keys: ${{ runner.os }}-npm-

- name: Install dependencies
run: npm install

# The audit scripts use only Node built-ins: no install, no secrets,
# so this job also runs on fork PRs, which never receive repo secrets
- name: Check broken nav & content links
run: node scripts/audit-links.mjs

Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"@astrojs/mdx": "^4.3.12",
"@astrojs/react": "^4.3.1",
"@astrojs/sitemap": "^3.6.0",
"@futureagi/chat-widget": "workspace:*",
"@giscus/react": "^3.1.0",
"@tailwindcss/vite": "^4.1.17",
"astro": "^5.16.3",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 13 additions & 1 deletion scripts/check-deleted-pages.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Default base branch: dev
*/
import { execSync } from 'child_process';
import { readFileSync } from 'fs';
import { existsSync, readFileSync } from 'fs';

const baseBranch = process.argv[2] || 'dev';

Expand Down Expand Up @@ -48,6 +48,14 @@ function fileToPath(file) {
.replace(/\/index$/, '') || '/';
}

// A deleted file needs no redirect when its route is still served by another
// page file (e.g. deleting foo.mdx while foo/index.mdx exists)
function routeStillServed(urlPath) {
const base = `src/pages${urlPath === '/' ? '' : urlPath}`;
return ['.mdx', '.astro', '.md', '/index.mdx', '/index.astro', '/index.md']
.some(suffix => existsSync(`${base}${suffix}`));
}

// Load redirects map
const redirectsRaw = readFileSync('src/lib/redirects.ts', 'utf-8');
const redirectEntries = [...redirectsRaw.matchAll(/["']([^"']+)["']:\s*["']([^"']+)["']/g)];
Expand All @@ -57,6 +65,10 @@ const redirectMap = new Set(redirectEntries.map(([, from]) => from));
const missing = [];
for (const file of deletedPages) {
const urlPath = fileToPath(file);
if (routeStillServed(urlPath)) {
console.log(` ${urlPath} still served by another page file, no redirect needed. ✓`);
continue;
}
if (!redirectMap.has(urlPath)) {
missing.push({ file, urlPath });
}
Expand Down
1 change: 1 addition & 0 deletions src/components/AiChatWidget.astro
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const turnstileSiteKey = import.meta.env.PUBLIC_TURNSTILE_SITE_KEY || '';

<!-- Chat popup -->
<div
data-pagefind-ignore
id="ai-chat-popup"
class="fixed z-50 rounded-2xl border border-[var(--color-border-default)] shadow-2xl shadow-black/30 flex-col overflow-hidden hidden"
style="background: #111111; bottom: 24px; right: 24px; width: 420px; height: 560px;"
Expand Down
3 changes: 2 additions & 1 deletion src/components/CopyPageDropdown.astro
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ interface Props {
mcpHref?: string;
}

const { pageTitle, mcpHref = '/docs/quickstart/setup-mcp-server' } = Astro.props;
const { pageTitle, mcpHref = '/docs/falcon-ai/guides/use-the-mcp-server' } = Astro.props;
---

<div class="relative inline-flex items-center" id="copy-page-dropdown-wrapper">
Expand Down Expand Up @@ -34,6 +34,7 @@ const { pageTitle, mcpHref = '/docs/quickstart/setup-mcp-server' } = Astro.props

<!-- Dropdown menu -->
<div
data-pagefind-ignore
id="copy-page-menu"
class="hidden absolute top-full left-0 mt-1 w-72 rounded-xl border border-[var(--color-border-subtle)] bg-[var(--color-bg-primary)] shadow-xl z-50 overflow-hidden"
>
Expand Down
14 changes: 7 additions & 7 deletions src/components/Sidebar.astro
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ function getIconPath(icon?: string): string {
// Reorders the Docs section dropdown from alphabetical to agent-development-
// lifecycle order, grouped under lightweight phase headers. This is dropdown-only
// and does NOT reorder the `groups` array in navigation.ts, so the page list below
// still follows nav order. "Resources" is intentionally omitted; "Falcon AI" sits
// last; a "Reference" group links out to the Integrations/Guides/SDK/API tabs.
// still follows nav order. "Falcon AI" sits last before Administration; a "Reference"
// group links out to the Integrations/Guides/SDK/API tabs.
// The dropdown only renders when a tab exposes multiple groups (today that's the
// Docs tab); any other multi-group tab falls back to a single unlabelled list.
interface DropdownItem { title: string; icon: string; href: string; }
Expand All @@ -124,9 +124,9 @@ const phasedOrder: { phase: string; titles: string[] }[] = [
{ phase: 'Observe & diagnose', titles: ['Observability', 'Error Feed'] },
{ phase: 'Evaluate & measure', titles: ['Evaluation', 'Simulation', 'Dataset'] },
{ phase: 'Improve', titles: ['Optimization', 'Annotations'] },
{ phase: 'Build & connect', titles: ['Prompt', 'Prototype', 'Agent Playground', 'Knowledge Base', 'Agent Command Center'] },
{ phase: 'Protect', titles: ['Protect'] },
{ phase: 'Build & connect', titles: ['Prompt', 'Prototype', 'Agent Playground', 'Knowledge Base', 'Agent Command Center', 'Protect'] },
{ phase: 'Assistant', titles: ['Falcon AI'] },
{ phase: 'Administration', titles: ['RBAC'] },
];

// Reference links live in their own top-level tabs; surface them at the bottom.
Expand Down Expand Up @@ -159,9 +159,9 @@ if (isDocsTab) {
.map(p => ({ phase: p.phase, items: p.titles.filter(t => groupLookup.has(t)).map(toItem) }))
.filter(s => s.items.length > 0);

// Future-proofing: surface any Docs group not placed above (besides the hidden
// "Resources") under "More" so new products never silently vanish.
const placed = new Set<string>([...phasedOrder.flatMap(p => p.titles), 'Resources']);
// Future-proofing: surface any Docs group not placed above under "More" so new
// products never silently vanish.
const placed = new Set<string>(phasedOrder.flatMap(p => p.titles));
const leftovers = allGroups.map(g => g.group).filter(t => !placed.has(t)).map(toItem);
if (leftovers.length) dropdownSections.push({ phase: 'More', items: leftovers });

Expand Down
Loading
Loading