This guide explains how to add and edit documentation for the Future AGI docs site. No prior web development experience is required.
- Quick Start
- Project Structure
- Writing Documentation Pages
- Adding Pages to Navigation
- Using Components
- Formatting & Markdown
- Images & Assets
- Running Locally
- Common Tasks
- Troubleshooting
# Clone the repository
git clone <repository-url>
cd landing-page
# Install dependencies
npm install
# Start the development server
npm run devOpen http://localhost:4321 in your browser to see the site.
landing-page/
├── src/
│ ├── pages/ # All documentation pages go here
│ │ ├── index.astro # Homepage (/)
│ │ ├── changelog.astro # Changelog page
│ │ └── docs/ # Documentation pages
│ │ ├── quickstart.mdx
│ │ ├── installation.mdx
│ │ ├── api.mdx
│ │ └── evaluate/ # Nested section
│ │ ├── index.mdx # Section overview
│ │ └── metrics.mdx # Sub-page
│ │
│ ├── components/ # Reusable UI components
│ │ └── docs/ # Documentation-specific components
│ │ ├── Callout.astro
│ │ ├── Card.astro
│ │ └── CodeGroup.astro
│ │
│ ├── layouts/ # Page layouts
│ │ ├── BaseLayout.astro
│ │ └── DocsLayout.astro
│ │
│ ├── lib/ # Configuration files
│ │ └── navigation.ts # Sidebar & top navigation config
│ │
│ └── styles/
│ └── global.css # Global styles & theme
│
├── public/ # Static assets (images, icons)
└── package.json
- Create a new
.mdxfile in thesrc/pages/docs/folder - Add frontmatter at the top of the file
- Write your content using Markdown
- Add to navigation (see Adding Pages to Navigation)
Create a file at src/pages/docs/my-new-page.mdx:
---
layout: ../../layouts/DocsLayout.astro
title: My New Page
description: A brief description of what this page covers.
---
## Introduction
Write your content here using Markdown.
### Subsection
More content...Every documentation page must start with frontmatter (the section between --- markers):
| Field | Required | Description |
|---|---|---|
layout |
Yes | Always use ../../layouts/DocsLayout.astro (adjust ../ based on folder depth) |
title |
Yes | Page title (shown in browser tab and page header) |
description |
No | Brief description (shown below title, used for SEO) |
- Use lowercase letters
- Use hyphens for spaces (e.g.,
getting-started.mdx, notGetting Started.mdx) - Use
.mdxextension (allows using components in Markdown) - The filename becomes the URL path:
src/pages/docs/quickstart.mdx→/docs/quickstartsrc/pages/docs/evaluate/metrics.mdx→/docs/evaluate/metrics
For sections with sub-pages (like /docs/evaluate/):
src/pages/docs/evaluate/
├── index.mdx # Overview page at /docs/evaluate
├── metrics.mdx # Sub-page at /docs/evaluate/metrics
├── custom.mdx # Sub-page at /docs/evaluate/custom
└── datasets.mdx # Sub-page at /docs/evaluate/datasets
Edit src/lib/navigation.ts to add pages to the sidebar:
export const navigation: NavSection[] = [
{
title: 'Getting Started', // Section header
icon: 'book', // Icon name (see icon list below)
items: [
{ title: 'Introduction', href: '/docs/introduction' },
{ title: 'Quickstart', href: '/docs/quickstart', badge: '5 min' },
{ title: 'Installation', href: '/docs/installation' },
// Add your new page here:
{ title: 'My New Page', href: '/docs/my-new-page' },
]
},
// ... more sections
];| Field | Required | Description |
|---|---|---|
title |
Yes | Display text in sidebar |
href |
Yes | URL path to the page |
badge |
No | Small label (e.g., "New", "5 min", "Beta") |
Use these icon names for section headers:
book- Getting started, guidescheck-circle- Evaluation, testingactivity- Monitoring, observabilitytrending-up- Optimization, performanceshield- Security, protectionplay-circle- Simulation, demospuzzle- Integrationscode- API, SDK referencefile- General documentation
Edit the topNav array in src/lib/navigation.ts:
export const topNav = [
{ title: 'Docs', href: '/' },
{ title: 'Cookbook', href: '/docs/cookbooks' },
{ title: 'Libraries', href: '/docs/integrations' },
{ title: 'Data API', href: '/docs/api' },
{ title: 'Changelog', href: '/changelog' },
// Add new top-level sections here
];MDX allows you to use React-like components in your Markdown. Import them at the top of your file.
---
layout: ../../layouts/DocsLayout.astro
title: Example Page
---
import Callout from '../../components/docs/Callout.astro';
## My Content
<Callout type="info">
This is an informational note.
</Callout>
<Callout type="warning">
Be careful about this!
</Callout>
<Callout type="error">
This will cause problems if ignored.
</Callout>
<Callout type="success">
Great job! You did it correctly.
</Callout>Callout Types:
info- Blue, for general informationwarning- Yellow, for cautionserror- Red, for critical warningssuccess- Green, for confirmations
import Card from '../../components/docs/Card.astro';
<Card title="Getting Started" href="/docs/quickstart">
Learn how to set up Future AGI in 5 minutes.
</Card>import CodeGroup from '../../components/docs/CodeGroup.astro';
<CodeGroup>
```python
# Python example
from futureagi import FutureAGI
client = FutureAGI()// JavaScript example
import { FutureAGI } from 'futureagi';
const client = new FutureAGI();import Prerequisites from '../../components/docs/Prerequisites.astro';
<Prerequisites>
- Python 3.8 or higher
- An API key from the dashboard
- Basic knowledge of REST APIs
</Prerequisites>import TLDR from '../../components/docs/TLDR.astro';
<TLDR>
- Install with `pip install futureagi`
- Set your API key
- Call `client.evaluate()` to get started
</TLDR># Heading 1 (don't use - page title handles this)
## Heading 2
### Heading 3
#### Heading 4
Regular paragraph text.
**Bold text**
*Italic text*
`inline code`
[Link text](https://example.com)
- Bullet list item
- Another item
- Nested item
1. Numbered list
2. Second item
> Blockquote for callouts or quotes
---
Horizontal rule aboveUse triple backticks with a language identifier:
```python
def hello():
print("Hello, world!")
```
```javascript
function hello() {
console.log("Hello, world!");
}
```
```bash
pip install futureagi
```
```json
{
"name": "example",
"version": "1.0.0"
}
```Supported languages: python, javascript, typescript, bash, json, yaml, sql, go, rust, java, and many more.
| Column 1 | Column 2 | Column 3 |
|----------|----------|----------|
| Row 1 | Data | More |
| Row 2 | Data | More |For REST API documentation, use this pattern:
### Create Evaluation
<span class="http-method http-post">POST</span> `/api/v1/evaluations`
Creates a new evaluation for the given input/output pair.-
Place images in the
public/folder:public/ └── images/ └── my-screenshot.png -
Reference in Markdown:

- Use descriptive filenames:
evaluation-dashboard.pngnotscreenshot1.png - Optimize images before adding (use tools like TinyPNG)
- Provide meaningful alt text for accessibility
- Recommended formats: PNG for screenshots, SVG for diagrams, WebP for photos
# Start the dev server with hot reload
npm run devThe site will be available at http://localhost:4321
Changes to .mdx files will automatically refresh in the browser.
# Create a production build
npm run build
# Preview the production build locally
npm run preview-
Create the file:
touch src/pages/docs/my-new-feature.mdx
-
Add content:
--- layout: ../../layouts/DocsLayout.astro title: My New Feature description: Learn how to use the new feature. --- ## Overview Explain the feature here...
-
Add to sidebar navigation in
src/lib/navigation.ts:{ title: 'Getting Started', icon: 'book', items: [ // ... existing items { title: 'My New Feature', href: '/docs/my-new-feature' }, ] }
-
Test locally:
npm run dev
-
Add a new section object in
src/lib/navigation.ts:{ title: 'New Section', icon: 'puzzle', // Choose an icon items: [ { title: 'Overview', href: '/docs/new-section' }, { title: 'First Topic', href: '/docs/new-section/first-topic' }, ] }
-
Create the corresponding pages:
mkdir -p src/pages/docs/new-section touch src/pages/docs/new-section/index.mdx touch src/pages/docs/new-section/first-topic.mdx
Edit src/pages/changelog.astro or create entries following the existing pattern.
{ title: 'New Feature', href: '/docs/new-feature', badge: 'New' }
{ title: 'Quick Start', href: '/docs/quickstart', badge: '5 min' }
{ title: 'Experimental', href: '/docs/experimental', badge: 'Beta' }- Check the file is in
src/pages/docs/ - Verify the filename uses
.mdxextension - Ensure frontmatter has correct
layoutpath - Check for typos in the URL
- Verify you added the item to
src/lib/navigation.ts - Check the
hrefmatches the file path exactly - Restart the dev server:
npm run dev
- Check the import path is correct (count the
../properly) - Ensure you're using
.mdxnot.mdextension - Component names are case-sensitive
The layout path depends on your file's location:
| File Location | Layout Path |
|---|---|
src/pages/docs/page.mdx |
../../layouts/DocsLayout.astro |
src/pages/docs/section/page.mdx |
../../../layouts/DocsLayout.astro |
src/pages/docs/section/sub/page.mdx |
../../../../layouts/DocsLayout.astro |
# Clear cache and rebuild
rm -rf node_modules/.astro
npm run build- Be concise - Get to the point quickly
- Use active voice - "Run the command" not "The command should be run"
- Start with the goal - Tell readers what they'll achieve
- Use examples - Show, don't just tell
- Keep paragraphs short - 2-3 sentences max
- Use H2 (
##) for main sections - Use H3 (
###) for subsections - Use H4 (
####) sparingly for sub-subsections - Don't skip levels (don't go from H2 to H4)
- Keep headings short and descriptive
- Always specify the language for syntax highlighting
- Keep examples minimal and focused
- Include comments for complex code
- Show expected output when helpful
- Questions? Open an issue in the repository
- Found a bug? Report it with steps to reproduce
- Suggestions? We welcome pull requests!
- Created
.mdxfile in correct location - Added frontmatter with layout, title, description
- Added to
navigation.ts - Tested locally with
npm run dev - Checked all links work
- Reviewed for typos
| What | Where |
|---|---|
| Documentation pages | src/pages/docs/*.mdx |
| Navigation config | src/lib/navigation.ts |
| Components | src/components/docs/*.astro |
| Images | public/images/* |
| Global styles | src/styles/global.css |