# one-ox

## Org export backend used by the default render functions

`one.el` (specifically the default render functions) uses its own org export backend called `one-ox` to export the org content of the pages into HTML strings.

For instance, the render function `one-default` takes as first argument `page-tree` which is the current page being rendered (`page-tree` is the org parsed data structure representing the page) and exports it as an HTML string using `org-export-data-with-backend` function and `one-ox` export backend and uses it to render the HTML page:

    (defun one-default (page-tree pages _global)
      "..."
      (let* (...
             (content (org-export-data-with-backend
                       (org-element-contents page-tree)
                       'one-ox nil))
             ...)
        (jack-html
         "<!DOCTYPE html>"
         `(:html
           (:head ...)
           (:body ... (:div.content ... ,content ,nav))))))

This org backend is taylor for `one.el` usage. So it doesn't try to export all the org elements unlike `html` backend and when the org elements are exported they differ from what we can expect from `html` backend.

For instance `headline` elements don't take into account markups neither links.

Another example are the `link` elements. They don't support org fuzzy links and links to local files that are not in the subdirectories `./public/` or `./assets/` raise errors.

You can read how the supported org elements are exported by `one-ox` org backend in the following page:

- one-ox | headline,

- one-ox | src-block,

- one-ox | quote-block,

- one-ox | fixed-width and example-block,

- one-ox | links and

- one-ox | plain-list.

## Org elements not supported

The org elements that are not supported are the following: `center-block`, `clock`, `drawer`, `dynamic-block`, `entity`, `export-block`, `export-snippet`, `footnote-reference`, `horizontal-rule`, `inline-src-block`, `inlinetask`, `keyword`, `latex-environment`, `latex-fragment`, `line-break`, `node-property`, `planning`, `property-drawer`, `radio-target`, `special-block`, `statistics-cookie`, `table`, `table-cell`, `table-row`, `target`, `timestamp`, `verse-block`.

Note that "not supported" means they are not rendered by default by `one.el` but we can still use them or even extend `one-ox` org export backend to take some of them into account.

Why doesn't `one.el` support all org elements?

1. I don't need those org elements to write my technical blogs:

   - I don't do math. No support for Latex,

   - I don't use table. No support for tables,

   - etc.

2. `one-ox` org backend is used only by the default render functions, so if you need more org elements you can either use another org backend or extend `one-ox` org backend and use this other org backend in your own render functions (See Extend one-ox org backend).