Kitchen Sink Example
Kitchen Sink Example
Section titled “Kitchen Sink Example”This page demonstrates all the features available in Starlight. Use this as a reference for what you can do in your documentation.
Heading Levels
Section titled “Heading Levels”Level 3 Heading
Section titled “Level 3 Heading”This is a level 3 heading. You can use multiple heading levels to organize your content hierarchically.
Level 4 Heading
Section titled “Level 4 Heading”Level 4 headings are useful for more granular organization.
Level 5 Heading
Section titled “Level 5 Heading”Even deeper nesting is available for complex topics.
Level 6 Heading
Section titled “Level 6 Heading”This is the deepest heading level available.
Basic Content
Section titled “Basic Content”Regular paragraph text goes here. You can write bold text, italic text, bold and italic, inline code, and links.
You can also use lists:
- First item
- Second item
- Nested item
- Another nested item
- Third item
Numbered lists work too:
- First step
- Second step
- Third step
- Sub-step A
- Sub-step B
Asides
Section titled “Asides”Asides are highlighted blocks that call attention to specific information.
Code Blocks
Section titled “Code Blocks”JavaScript
Section titled “JavaScript”function helloWorld(name) { console.log(`Hello, ${name}!`); return true;}
helloWorld('Starlight');Python
Section titled “Python”def hello_world(name): print(f"Hello, {name}!") return True
hello_world('Starlight')<!DOCTYPE html><html lang="en"> <head> <meta charset="UTF-8" /> <title>Example Page</title> </head> <body> <h1>Hello, World!</h1> <p>This is an example HTML page.</p> </body></html>body { font-family: 'Inter', sans-serif; background-color: #f5f5f5; color: #333; line-height: 1.6;}
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px;}{ "name": "starlight-theme-wpe", "version": "1.0.0", "description": "A theme for Starlight", "type": "module", "exports": { ".": "./index.js" }}With Line Highlighting
Section titled “With Line Highlighting”function calculateTotal(items) { let total = 0; for (let item of items) { total += item.price * item.quantity; }
return total;}Tabs are useful for showing multiple options or variants:
bash npm install @wpengine/starlight-theme-wpe bash pnpm add @wpengine/starlight-theme-wpe bash yarn add @wpengine/starlight-theme-wpe Tabs with Code Examples
Section titled “Tabs with Code Examples”function Button() { return <button>Click me</button>;}<template> <button>Click me</button></template><button>Click me</button>Blockquotes
Section titled “Blockquotes”This is a blockquote. It’s useful for quoting text from other sources or highlighting important passages.
“The best way to predict the future is to invent it.” — Alan Kay
Horizontal Rules
Section titled “Horizontal Rules”Tables
Section titled “Tables”| Feature | Status | Description |
|---|---|---|
| Asides | ✅ | Supported |
| Code Blocks | ✅ | With syntax highlighting |
| Tabs | ✅ | For multi-option content |
| Tables | ✅ | For tabular data |
| Custom Components | ✅ | MDX support |
Key Takeaways
Section titled “Key Takeaways”Check out the example reference for more information.