Astro
Use @orgajs/astro to write Astro pages in Org Mode (.org) and compile them with orgx.
Quick Start
- Install the integration:
pnpm add @orgajs/astro- Register it in
astro.config.mjs:
import { defineConfig } from 'astro/config'
import orgMode from '@orgajs/astro'
export default defineConfig({
integrations: [orgMode()]
})- Create a page at
src/pages/index.org:
* Hello from Org Mode
This page is rendered from Org Mode in Astro.- Start Astro:
pnpm astro devMajor Features
Native .org pages in Astro
Any file in src/pages/*.org is treated as a page route, just like Astro files in other supported formats.
Org metadata support
Org keywords such as #+title:, #+description:, and #+slug: are parsed and exposed as entry metadata for Astro content handling.
orgx-powered compilation
Under the hood, this integration uses orgx (via @orgajs/rollup), so you get:
- Org Mode parsing to JSX-compatible output
- JavaScript imports/exports inside Org documents
- Unified/rehype/recma pipeline compatibility
Inline JSX components
You can embed JSX directly in Org files, including imported components.
#+jsx: import Card from '../components/Card.astro'
Here is a Card rendered inline:
#+jsx: <Card title="Inline component">Hello from Org + JSX</Card>
#+begin_export jsx
<section className="hero">
<h2>JSX export block</h2>
<p>You can also write larger JSX blocks.</p>
</section>
#+end_exportUse #+jsx: for single-line JSX/imports and #+begin_export jsx for multi-line blocks.