Your First Wiki
Let's create your first wiki page from scratch!
Step 1: Create a Markdown File
Create a new file in the content/ directory:
# Create a new file
touch content/my-first-page.mdStep 2: Add Frontmatter
Open the file and add frontmatter at the top:
---
title: My First Page
description: This is my first wiki page
---Frontmatter is optional but recommended for better SEO and navigation.
Step 3: Write Content
Add your content using Markdown:
---
title: My First Page
description: This is my first wiki page
---
# My First Page
Welcome to my first wiki page!
## What I Learned Today
- How to create a wiki page
- How to use Markdown
- How to add frontmatter
## Code Example
Here's a simple JavaScript function:
\`\`\`javascript
function greet(name) {
return `Hello, ${name}!`;
}
console.log(greet('World'));
\`\`\`
## Next Steps
I'm going to learn more about [Markdown basics](/content/markdown-basics).Step 4: View Your Page
Save the file and go to http://localhost:3000. That is it β the page is already in the sidebar under a section named after its folder, and already searchable.
There is no navigation array to update. Every Markdown file under content/ is
published automatically.
Organizing Content
Create Folders
Folders become sidebar sections:
mkdir -p content/guides
touch content/guides/getting-started.md
touch content/guides/advanced.mdBoth pages appear immediately, grouped under a Guides section.
Name and Order a Section
To control how a folder is presented, add a _meta.json beside its pages:
{
"name": "π Guides",
"order": 1,
"color": "#dbeafe"
}Order Pages
Use order in each page's frontmatter β lower comes first:
---
title: Getting Started
order: 1
---Pages without an order sort after those that have one, alphabetically.
Take Manual Control
If you want a structure the folders cannot express, add a navigation array to
payload/config.ts. It does not have to list everything β pages it omits are
still discovered and appended. See Navigation Configuration.
Tips for Great Wiki Pages
Use Clear Headings
# Main Title (H1)
## Section (H2)
### Subsection (H3)Add Code Blocks
\`\`\`typescript
const greeting: string = 'Hello, World!';
\`\`\`Link Between Pages
Check out [another page](/guides/getting-started).Add Lists
- Bullet point 1
- Bullet point 2
- Nested point
1. Numbered item 1
2. Numbered item 2Include Images
Common Patterns
Documentation Page
---
title: API Reference
description: Complete API documentation
---
# API Reference
## Authentication
All API requests require authentication...
## Endpoints
### GET /api/users
Returns a list of users...Tutorial Page
---
title: Building Your First App
description: Step-by-step tutorial
---
# Building Your First App
In this tutorial, you'll learn...
## Prerequisites
- Node.js installed
- Basic JavaScript knowledge
## Step 1: Setup
First, create a new project...Reference Page
---
title: Configuration Options
description: All available configuration options
---
# Configuration Options
## Global Settings
### title
- Type: `string`
- Required: Yes
- Description: Site title
### description
- Type: `string`
- Required: No
- Description: Site descriptionNext Steps
Congratulations! You've created your first wiki page. π