Skip to content
Astro Integration

Visual Editor for
Astro Content Collections

Write markdown visually, manage frontmatter with smart auto-generated forms, and edit content straight from your dev server.

Quick Start

Get up and running in under a minute.

terminal
# Install the integration
npx astro add @writenex/astro

# Start your dev server
astro dev

# Open the editor
http://localhost:4321/_writenex

That's it! Writenex will auto-discover your content collections and you can start editing.

Everything You Need

A complete editing experience for your Astro content collections.

Zero Config

Auto-detects your content collections from the src/content folder. Just install and start editing with no setup required.

Filesystem-based

Reads and writes directly to your content files. No database or sync layer. Everything stays inside your repository.

Smart Schema Detection

Identifies your frontmatter fields from existing content. Creates ready-to-use forms for titles, dates, tags, and more.

Image Upload

Drag and drop images with colocated or public storage options. Files are placed next to your content or in the public folder.

Version History

Creates automatic shadow copies on save. Restore any earlier version with one click and keep your work protected.

Autosave

Saves your work automatically at a configurable interval. Every change is stored instantly so progress is never lost.

Search and Filter

Locate content quickly with built-in search and draft filters. Navigate large collections with confidence and ease.

Preview Links

Open a live preview of your content in the browser. Check how updates look without leaving your editing flow.

Keyboard Shortcuts

Speed up your workflow with keyboard shortcuts. Press Ctrl+S to save, Alt+N to create new content, and more.

Configuration

Zero config by default, fully customizable when needed.

writenex.config.ts
import { defineConfig } from "@writenex/astro";

export default defineConfig({
  collections: [
    {
      name: "blog",
      path: "src/content/blog",
      filePattern: "{slug}.md",
      previewUrl: "/blog/{slug}",
      schema: {
        title: { type: "string", required: true },
        description: { type: "string" },
        pubDate: { type: "date", required: true },
        heroImage: { type: "image" },
        tags: { type: "array", items: "string" },
        draft: { type: "boolean", default: false },
      },
    },
  ],
  images: {
    strategy: "colocated", // or "public"
  },
});

Schema Field Types

TypeForm ComponentExample Value
stringText input"Hello World"
numberNumber input42
booleanToggle switchtrue
dateDate picker"2024-01-15"
arrayTag input["astro", "tutorial"]
imageImage uploader"./hero.jpg"

Image Strategies

Choose how images are stored in your project.

Colocated

Default

Images stored alongside content files in a folder with the same name. Best for content-specific images.

src/content/blog/
├── my-post.md
└── my-post/
    ├── hero.jpg
    └── diagram.png

Reference: ![Alt](./my-post/hero.jpg)

Public

Images stored in the public directory. Best for shared images used across multiple content items.

public/
└── images/
    └── blog/
        └── my-post-hero.jpg

Reference: ![Alt](/images/blog/my-post-hero.jpg)

File Patterns

Flexible file naming with automatic token resolution.

PatternExample OutputUse Case
{slug}.mdmy-post.mdSimple (default)
{slug}/index.mdmy-post/index.mdFolder-based
{date}-{slug}.md2024-01-15-my-post.mdDate-prefixed
{year}/{slug}.md2024/my-post.mdYear folders
{year}/{month}/{slug}.md2024/06/my-post.mdYear/month folders
{lang}/{slug}.mden/my-post.mdMulti-language
{category}/{slug}.mdtutorials/my-post.mdCategory folders

Patterns are auto-detected from existing content or can be configured explicitly.

Keyboard Shortcuts

Familiar shortcuts for efficient editing.

New contentAlt + N
SaveCtrl/Cmd + S
Open previewCtrl/Cmd + P
Show shortcuts helpCtrl/Cmd + /
Refresh contentCtrl/Cmd + Shift + R
Close modalEscape

Production Safe

@writenex/astro is disabled by default in production builds. The editor only runs during development to prevent accidental exposure of filesystem write access.

If you need to enable it for staging environments, use the allowProduction: true option with proper authentication.

Ready to Get Started?

Add @writenex/astro to your project and start editing visually.

Looking for a Standalone Editor?

Try Writenex Editor - a free WYSIWYG markdown editor that works in your browser. No sign-up required.

Open Editor