MDX.as
Instant preview and deployment for MDXLD documents
MDX.as
MDX.as provides instant preview and deployment for MDXLD documents - publish your content with a single command and get a live URL immediately.
What is MDX.as?
MDX.as is the fastest way to preview and share MDXLD documents:
- Instant Preview: Deploy and preview in seconds
- Custom Domains: Use
.assubdomain or custom domain - Zero Configuration: No setup required
- Type-Aware Rendering: Automatically renders based on
$type - Live Updates: Changes deploy instantly
- Public or Private: Control access with authentication
- Analytics: Built-in analytics and metrics
URL Patterns
Output + Custom URL: mdx.as/:output/:url
Preview with custom output format and URL:
Where:
:output- Output format (page, site, agent, app, api, sdk, docs, landing-page, waitlist, service):url- Custom URL path
Output + Database Structure: mdx.as/:output/:domain/:type/:id
Preview documents from the platform database:
Where:
:output- Output format:domain- The domain/namespace from database:type- Document$type:id- Document$id
Document Resolution
When you access mdx.as/:output/:url, the platform:
- Checks URL field: Looks for exact match in
urlfield - Checks path structure: Falls back to
domain/type/idresolution - Renders output: Applies output format template
- Returns preview: Live preview with the specified output
Preview Shortcut Aliases
Each output format has a convenient shortcut domain that's an alias for mdx.as/:output/:
- agents.as →
mdx.as/agent/ - page.as →
mdx.as/page/ - site.as →
mdx.as/site/ - service.as →
mdx.as/service/ - apps.as →
mdx.as/app/ - apis.as →
mdx.as/api/ - sdk.as →
mdx.as/sdk/ - docs.as →
mdx.as/docs/ - landing-page.as →
mdx.as/landing-page/ - waitlist.as →
mdx.as/waitlist/
Examples:
# These are equivalent:
https://mdx.as/agent/mystartup.co
https://agents.as/mystartup.co
# These are equivalent:
https://mdx.as/page/about
https://page.as/about
# These are equivalent:
https://mdx.as/site/portfolio
https://site.as/portfolioAll shortcut domains support both URL patterns:
[output].as/:url(custom URL)[output].as/:domain/:type/:id(database structure)
Output Formats
page.as - Single Pages
Preview individual pages:
---
$type: WebPage
$context: https://schema.org
name: About Us
url: /about
---
# About Us
We are building...Preview:
- Custom URL:
https://mdx.as/page/about - Database:
https://mdx.as/page/company.do/WebPage/about-us
site.as - Full Sites
Preview complete sites:
---
$type: WebSite
$context: https://schema.org
name: Portfolio
domain: portfolio.do
---
# My Portfolio
Welcome to my work...Preview:
- Custom URL:
https://mdx.as/site/portfolio - Database:
https://mdx.as/site/portfolio.do/WebSite/main
agent.as - AI Agents
Preview AI agent interfaces:
---
$type: Agent
$context: https://schema.org.ai
name: Customer Support Agent
domain: support.do
---
# Customer Support
How can I help you today?Preview:
- Custom URL:
https://mdx.as/agent/support - Database:
https://mdx.as/agent/support.do/Agent/customer-service
app.as - Applications
Preview applications:
---
$type: WebApplication
$context: https://schema.org
name: Task Manager
url: /tasks
---
# Task Manager
Manage your tasks...Preview:
- Custom URL:
https://mdx.as/app/tasks - Database:
https://mdx.as/app/productivity.do/WebApplication/task-manager
api.as - API Documentation
Preview API docs:
---
$type: APIReference
$context: https://schema.org
name: REST API
domain: api.do
---
# REST API
Our API provides...Preview:
- Custom URL:
https://mdx.as/api/rest - Database:
https://mdx.as/api/api.do/APIReference/rest-api
sdk.as - SDK Documentation
Preview SDK docs:
---
$type: SoftwareSourceCode
$context: https://schema.org
name: TypeScript SDK
url: /sdk/typescript
---
# TypeScript SDK
Install our SDK...Preview:
- Custom URL:
https://mdx.as/sdk/typescript - Database:
https://mdx.as/sdk/developers.do/SoftwareSourceCode/typescript-sdk
docs.as - Documentation
Preview documentation:
---
$type: Documentation
$context: https://schema.org
name: User Guide
url: /docs/getting-started
---
# Getting Started
Welcome to the guide...Preview:
- Custom URL:
https://mdx.as/docs/getting-started - Database:
https://mdx.as/docs/help.do/Documentation/getting-started
landing-page.as - Landing Pages
Preview landing pages:
---
$type: LandingPage
$context:
- https://schema.org
- https://schema.org.ai
name: Product Launch
url: /launch
hero:
headline: Build Amazing Products
---Preview:
- Custom URL:
https://mdx.as/landing-page/launch - Database:
https://mdx.as/landing-page/marketing.do/LandingPage/product-launch
waitlist.as - Waitlist Pages
Preview waitlist pages:
---
$type: WaitlistPage
$context: https://schema.org.ai
name: Beta Access
url: /beta
---
# Get Early Access
Sign up for beta...Preview:
- Custom URL:
https://mdx.as/waitlist/beta - Database:
https://mdx.as/waitlist/launch.do/WaitlistPage/beta-signup
service.as - Services
Preview service pages:
---
$type: Service
$context: https://schema.org
name: Image Optimization
url: /services/images
---
# Image Optimization
Optimize images on the fly...Preview:
- Custom URL:
https://mdx.as/service/images - Database:
https://mdx.as/service/cdn.do/Service/image-optimizer
Quick Start
Deploy from CLI
# Deploy with custom URL
mdxe deploy blog-post.mdx --target as --url /posts/hello-world
# Deploy with domain/type/id
mdxe deploy blog-post.mdx --target as --domain blog.do
# Deploy with output format
mdxe deploy landing.mdx --target as --output landing-page --url /launchDeploy from Web
- Visit mdx.as
- Drag and drop your MDX file
- Choose output format
- Get instant preview URL
Deploy from Platform
# Deploy by domain/type/id
mdxe deploy --platform blog.do/BlogPost/my-post --target as
# Deploy by custom URL
mdxe deploy --platform /posts/hello-world --target as --output pageFeatures
Instant Deployment
Deploy in seconds:
mdxe deploy --target as --url /mypage
# ✓ Deployed to https://mdx.as/page/mypage in 2.3sLive Updates
Changes deploy automatically:
mdxe deploy --target as --watch --url /mypage
# Watching for changes...
# ✓ Updated https://mdx.as/page/mypageType-Aware Rendering
Automatically renders based on $type:
BlogPost→ Blog layoutLandingPage→ Landing page layoutDocumentation→ Docs layoutAgent→ Agent interface
Custom Themes
Apply custom themes:
mdxe deploy --target as --theme dark --url /mypage
mdxe deploy --target as --theme custom.json --url /mypageAccess Control
Control who can view:
# Public (default)
mdxe deploy --target as --public --url /mypage
# Private (requires auth)
mdxe deploy --target as --private --url /mypage
# Password protected
mdxe deploy --target as --password mysecret --url /mypageAnalytics
Built-in analytics:
- Page views: Track visits
- Geographic data: See where visitors are from
- Referrers: Know how people found you
- Devices: Desktop vs mobile
- Real-time: Live visitor count
View analytics:
mdxe analytics https://mdx.as/page/mypageConfiguration
Deploy Config
Create .mdx/deploy.json:
{
"target": "as",
"output": "page",
"url": "/my-project",
"theme": "dark",
"access": "public",
"analytics": true
}Deploy with config:
mdxe deployAPI
Deployment API
Deploy programmatically:
import { deploy } from 'mdxe'
const result = await deploy({
target: 'as',
output: 'page',
url: '/my-project',
files: ['blog-post.mdx'],
public: true
})
console.log(`Deployed to: ${result.url}`)
// https://mdx.as/page/my-projectPreview API
Get preview info:
import { getPreview } from 'mdxe'
const preview = await getPreview('mdx.as/page/my-project')
console.log(preview.views) // Page views
console.log(preview.visitors) // Unique visitors
console.log(preview.updated) // Last updatedBest Practices
- Use custom URLs: For human-readable paths
- Choose right output: Match output format to
$type - Add analytics: Track visitor metrics
- Set access control: Use private for sensitive content
- Custom themes: Brand your previews
- Live updates: Use watch mode during development
- Clean up: Delete unused previews
- Environment variables: Keep secrets in env vars
Resources
- Website: mdx.as
- Status: status.mdx.as
- Examples: examples.mdx.as
- Support: [email protected]