Getting Started

Basic Setup

Orga is built on the unified ecosystem. The core parser package @orgajs/reorg is the minimum requirement to get started.

Simple HTML Compilation

To transform Org-mode content into HTML, install the required packages:

npm install @orgajs/reorg @orgajs/reorg-rehype rehype-stringify unified-stream

Create a basic compilation script:

// compile.js
const stream = require('unified-stream')
const reorg = require('@orgajs/reorg')
const mutate = require('@orgajs/reorg-rehype')
const html = require('rehype-stringify')

const processor = reorg()
      .use(mutate)
      .use(html)

process.stdin.pipe(stream(processor)).pipe(process.stdout)

Convert your Org files to HTML:

node compile.js < input.org > output.html

Example Input (input.org)

* Hello Orga
Orga is *awesome*.

Yields Output (output.html)

<div class="section">
	<h1>Hello Orga</h1>
	<p>Orga is <strong class="">awesome</strong>. </p>
</div>