published VisibilityinternalOwner@erikApprover_Created_Updated_
Forge Markdown MDX Syntax (.mdx)
A guide to every Markdown and MDX feature you can use in .mdx files across Uvilo OS docs. Our site runs on Astro Starlight, which extends standard Markdown with JSX components and Expressive Code enhancements.
Asides are colored callout boxes for secondary information. In .mdx files, use the component syntax.
There are four types:
Type
Color
Icon
Use for
note
Blue
ℹ️
Informational notes
tip
Purple
🚀
Helpful suggestions
caution
Yellow
⚠️
Warnings to be careful
danger
Red
🛑
Critical warnings
Basic asides
import { Aside } from '@astrojs/starlight/components';<Aside type="note">This is a note aside.</Aside><Aside type="tip">Here's a helpful tip!</Aside><Aside type="caution">Be careful with this approach.</Aside><Aside type="danger">Do not delete the production database!</Aside>
Result:
Custom titles
<Aside type="caution" title="Watch out!">This has a custom title.</Aside>
Result:
Asides can contain nested Markdown, including code blocks.
import { Steps } from '@astrojs/starlight/components';<Steps>1. **Install the package** ```bash npm install my-package ```2. **Configure your project** Create a config file in your project root.3. **Import and use** ```js import { myFunction } from 'my-package'; myFunction(); ```</Steps>
Result:
Install the package
npm install my-package
Configure your project
Create a config file in your project root.
Import and use
import { myFunction } from 'my-package';myFunction();
import { Card } from '@astrojs/starlight/components';<Card title="Getting Started" icon="rocket"> Learn how to set up your first project in minutes.</Card>
Result:
Getting Started
Learn how to set up your first project in minutes.
CardGrid
Arrange multiple cards in a responsive grid. Add the stagger prop for a subtle animation.
import { Card, CardGrid } from '@astrojs/starlight/components';<CardGrid> <Card title="Installation" icon="laptop"> Step-by-step installation instructions. </Card> <Card title="Configuration" icon="setting"> Customize your setup. </Card> <Card title="Integrations" icon="puzzle"> Connect with your favorite tools. </Card> <Card title="Deployment" icon="rocket"> Deploy to production with ease. </Card></CardGrid>
Result:
Installation
Step-by-step installation instructions.
Configuration
Customize your setup.
Integrations
Connect with your favorite tools.
Deployment
Deploy to production with ease.
LinkCard and LinkButton
Navigation and call-to-action components.
import { LinkCard, LinkButton } from '@astrojs/starlight/components';<LinkCard title="Getting Started Guide" description="Learn the basics of setting up your project." href="/guides/getting-started/"/><LinkButton href="/getting-started/">Get Started</LinkButton><LinkButton href="/guides/" variant="secondary">Read the Guides</LinkButton>
Highlight specific lines with curly braces after the language. Use {1,4-6} for non-consecutive lines.
```js {2-3}function demo() { // This line and the next are highlighted return 'highlighted';}```
Result:
function demo() { // This line and the next are highlighted return 'highlighted';}
Mark inserted and deleted text
Show additions and removals with ins= and del=. Default markers (in quotes) highlight in neutral yellow, ins= in green (additions), del= in red (deletions).
```js "return true;" ins="inserted" del="deleted"function demo() { console.log('These are inserted and deleted marker types'); // The return statement uses the default marker type return true;}```
Result:
function demo() { console.log('These are inserted and deleted marker types'); // The return statement uses the default marker type return true;}
Window frames and titles
Expressive Code adds a terminal/editor window frame around code blocks by default. Use title= to add a filename.
```js title="astro.config.mjs"import { defineConfig } from 'astro/config';export default defineConfig({});```
Result:
astro.config.mjs
import { defineConfig } from 'astro/config';export default defineConfig({});
Mermaid Diagrams
Our site supports Mermaid diagrams inline:
```mermaidgraph TD A[Start] --> B{Decision} B -->|Yes| C[Action 1] B -->|No| D[Action 2] C --> E[End] D --> E```
Result:
graph TD
A[Start] --> B{Decision}
B -->|Yes| C[Action 1]
B -->|No| D[Action 2]
C --> E[End]
D --> E
Mermaid supports flowcharts, sequence diagrams, class diagrams, state diagrams, Gantt charts, and more.
Frontmatter
Frontmatter contains metadata used to identify the document and organize it in the sidebar. This is handled automatically by Forge agents, and never edited by humans.
Full frontmatter reference
---title: My Documentation Pagedescription: Learn how to use the example feature.# Table of contentstableOfContents: minHeadingLevel: 2 maxHeadingLevel: 4# tableOfContents: false # hide TOC entirely# Page template ('doc' is default, 'splash' for landing pages)template: doc# Last updated datelastUpdated: 2024-01-15# Paginationprev: link: /guides/introduction label: Introductionnext: false # hide next link# Sidebar customizationsidebar: label: Custom Label order: 1 hidden: false badge: text: New variant: tip# Announcement bannerbanner: content: We just launched v2.0!# Exclude from searchpagefind: false# Draft (hidden in production)draft: false---