# Alternative input formats

**URL:** <https://zola.discourse.group/t/alternative-input-formats/76>\
**Category:** Feature requests\
**Created:** [March 26, 2019, 5:59pm UTC](https://zola.discourse.group/t/alternative-input-formats/76 "2019-03-26T17:59:37Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![keats](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@keats](https://zola.discourse.group/u/keats)\
**Post date:** [March 26, 2019, 5:59pm UTC](https://zola.discourse.group/t/alternative-input-formats/76/1 "2019-03-26T17:59:37Z")

</div>

Currently, Zola only supports CommonMark.

There have been some requests for [Asciidoc](https://github.com/getzola/zola/issues/32) and [rst](https://github.com/getzola/zola/issues/638).

Adding an input format is a VERY significant amount of work, even assuming there is an existing parser for it in Rust which is a big assumption. Since I don’t personally need it, the implementation would need to come from a contributor.

The goal is not to support every format under the sun as it increases the burden considerably: any addition in the content like the shortcodes need to be replicated `n` times. Therefore I would prefer to have `n <= 2`, with my own preference going to Asciidoc for the alternative one.

Any alternative input format needs to support the same feature set as CommonMark:

- shortcodes
- automatic header link insertion
- syntax highlighting
- link checking
- relative links
- summary

---

<div class="post-metadata">

**Author:** ![Aster](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/aster/32/148_2.png) [@Aster](https://zola.discourse.group/u/Aster)\
**Post date:** [February 25, 2020, 3:58am UTC](https://zola.discourse.group/t/alternative-input-formats/76/2 "2020-02-25T03:58:56Z")

</div>

I want to add a front end to zola, [https://github.com/nyar-lang/notedown-rs](https://github.com/nyar-lang/notedown-rs)

I thought of these two options

## Built-in interaction

It seems I just need to implement the Page structure here:

> <https://github.com/getzola/zola/blob/master/components/library/src/content/page.rs>

The disadvantage of doing this is that there will be a large runtime, which is unfair to users who do not need this mode, and it is not flexible and requires synchronous modification.

## Port interaction

Register file type notedown with Zola

When the notedown file changes, pass the file content to notedown\_zola for processing, then zola serve reads the result and deserializes it.

The interface might look like this:

```auto
[frontend.notedown]
name = "notedown"
file_type = ["note", "notedown"]
preprocessor = "notedown_zola --page ${filepath}"
deserializes = "json"

```

---

<div class="post-metadata">

**Author:** ![dertuxmalwieder](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/dertuxmalwieder/32/336_2.png) [@dertuxmalwieder](https://zola.discourse.group/u/dertuxmalwieder)\
**Post date:** [October 6, 2020, 12:02pm UTC](https://zola.discourse.group/t/alternative-input-formats/76/3 "2020-10-06T12:02:14Z")

</div>

I’d like to add `org` to the wishlist. There seems to be a working crate for that:

> **[PoiScript/orgize](https://github.com/PoiScript/orgize)**
>
> A Rust library for parsing orgmode files. Contribute to PoiScript/orgize development by creating an account on GitHub.

Also, it is a relatively feature-rich format, even when compared to CommonMark:

> **[The four differences between .org and CommonMark I could spot right now is...](https://news.ycombinator.com/item?id=19660902)**

---

<div class="post-metadata">

**Author:** ![SpyrosRoum](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/spyrosroum/32/454_2.png) [@SpyrosRoum](https://zola.discourse.group/u/SpyrosRoum)\
**Post date:** [March 7, 2021, 1:31pm UTC](https://zola.discourse.group/t/alternative-input-formats/76/4 "2021-03-07T13:31:44Z")

</div>

Hello, I would like to see support for asciidoc as well and I would be willing to help implement it but I don’t know where to start at all. I haven’t written a parser before but I consider myself fluent in Rust.  
If you are willing to help and maybe guide me a bit I’d love to do this

---

<div class="post-metadata">

**Author:** ![elz](https://avatars.discourse-cdn.com/v4/letter/e/779978/32.png) [@elz](https://zola.discourse.group/u/elz)\
**Post date:** [March 22, 2021, 8:57am UTC](https://zola.discourse.group/t/alternative-input-formats/76/5 "2021-03-22T08:57:44Z")

</div>

To compare, Hugo has some level of Asciidoc support, which seems essentially to be that they run Asciidoctor on any .adoc file, via their external helper feature. I played around a bit with that in order to if it was feasible to include Asciidoc files into a Hugo-based documentation website.

The initial result was not that good and you do not get an option to pass additional options to asciidoctor. I have seen others work around this by setting up wrapper scripts around asciidoctor, so that Hugo executes the script, which in turn provides the options and additional plugins they wanted.

I had a look at pandoc also, but it does not support converting from asciidoc, only to asciidoc last time I checked.

Anyway, my guess is that something with a reasonable amount of effort would be something similar to how Hugo handles it, perhaps with an option to configure what the command-line to execute should look like.

---

<div class="post-metadata">

**Author:** ![SpyrosRoum](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/spyrosroum/32/454_2.png) [@SpyrosRoum](https://zola.discourse.group/u/SpyrosRoum)\
**Post date:** [April 12, 2021, 2:22pm UTC](https://zola.discourse.group/t/alternative-input-formats/76/6 "2021-04-12T14:22:36Z")

</div>

I think using asciidoctor would be very doable and nice but wouldn’t it go against the “single binary with everything built-in” thing?

---

<div class="post-metadata">

**Author:** ![elz](https://avatars.discourse-cdn.com/v4/letter/e/779978/32.png) [@elz](https://zola.discourse.group/u/elz)\
**Post date:** [April 12, 2021, 6:33pm UTC](https://zola.discourse.group/t/alternative-input-formats/76/7 "2021-04-12T18:33:29Z")

</div>

Yes, it certainly does.  
Hugo has also had the “single binary for everything” approach for a long time as well but has diverged a bit from that.

An optional and explicit (more explicit than in Hugo) callout to an external tool would not change that approach for most people - if you use Markdown it will only be the same single binary as before. People that would like to use Asciidoc, ReStructuredText, or similar in combination with Zola would likely already have the primary tools of choice for these formats already.

---

<div class="post-metadata">

**Author:** ![SpyrosRoum](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/spyrosroum/32/454_2.png) [@SpyrosRoum](https://zola.discourse.group/u/SpyrosRoum)\
**Post date:** [April 13, 2021, 11:51am UTC](https://zola.discourse.group/t/alternative-input-formats/76/8 "2021-04-13T11:51:41Z")

</div>

I think I agree with you. I might do some experimentation once I find the time and see how well it would work in practice

---

<div class="post-metadata">

**Author:** ![keats](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@keats](https://zola.discourse.group/u/keats)\
**Post date:** [April 13, 2021, 8:37pm UTC](https://zola.discourse.group/t/alternative-input-formats/76/9 "2021-04-13T20:37:55Z")

</div>

I’m keen on not keeping the “everything in a binary” though. Adding some exceptions like “oh install X to do Y” for many cases just detracts from what Zola is meant to offer. If there was a binding/Rust rewrite of Asciidoc it would be much better.

---

<div class="post-metadata">

**Author:** ![SpyrosRoum](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/spyrosroum/32/454_2.png) [@SpyrosRoum](https://zola.discourse.group/u/SpyrosRoum)\
**Post date:** [April 14, 2021, 10:15am UTC](https://zola.discourse.group/t/alternative-input-formats/76/10 "2021-04-14T10:15:35Z")

</div>

I’m a little confused by what you wrote.  
You said you are keen on **not** keeping the “everything in a binary” but adding these exceptions is not good.  
So I’m not sure if you are giving the go ahead or not.

Though I do agree that Rust version of Asciidoctor would be nice and probably even ideal (if we ignore the amount of work it would take to make)

---

<div class="post-metadata">

**Author:** ![keats](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@keats](https://zola.discourse.group/u/keats)\
**Post date:** [April 14, 2021, 11:33am UTC](https://zola.discourse.group/t/alternative-input-formats/76/11 "2021-04-14T11:33:16Z")

</div>

Ah sorry I mixed the other sentence I had in mind. I’m keen ON keeping “everything in a binary”

---

<div class="post-metadata">

**Author:** ![SpyrosRoum](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/spyrosroum/32/454_2.png) [@SpyrosRoum](https://zola.discourse.group/u/SpyrosRoum)\
**Post date:** [April 14, 2021, 3:10pm UTC](https://zola.discourse.group/t/alternative-input-formats/76/12 "2021-04-14T15:10:00Z")

</div>

I see, that makes a lot more sense.  
I _might_ try to work some bindings up using [rutie](https://github.com/danielpclark/rutie) when I get the time but no promises

---

<div class="post-metadata">

**Author:** ![erlend\_sh](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/erlend_sh/32/819_2.png) [@erlend\_sh](https://zola.discourse.group/u/erlend_sh)\
**Post date:** [August 19, 2023, 7:19am UTC](https://zola.discourse.group/t/alternative-input-formats/76/13 "2023-08-19T07:19:56Z")

</div>

I’d like to propose support for an emerging input format called subtext:

```
https://github.com/subconsciousnetwork/subtext

https://subconscious.substack.com/p/self-organizing-ideas

```

It is the markup for [Noosphere](https://subconscious.substack.com/p/noosphere-a-protocol-for-thought). Their flagship app is [now in beta](https://subconscious.substack.com/p/subconscious-beta).

```
https://github.com/subconsciousnetwork/noosphere

```

The markup is still in draft mode so there’s ample time to evaluate its usefulness to Zola in the meantime. I am however very excited at the notion of supporting subtext, because together with Noosphere/Subconscious it is designed specifically for “garden writing”, which is how I approach my personal blog.

```
https://joelhooks.com/digital-garden

```
