Zola: Support other input formats

Created on 8 Apr 2017  路  9Comments  路  Source: getzola/zola

Hello.
It would be nice to support other input formats, like asciidoctor.
Hugo supports these formats.
Thanks.

Most helpful comment

Just to keep you informed: I started to work on the asciidoctor parser.

The HTML generator is implemented with a trait, so you should be able to change the result the way you want.

Please note that the API will change as I'm experimenting with different designs.

All 9 comments

Hi,

It's very unlikely that I will add support for more input formats in the near future for a few reasons:

  • no crate for asciidoc and the only crate for rst doesn't seem finished (no docs too) from a quick research on crates.io
  • if there were crates for them, I'd still need to be able to hook into the parser like I'm doing with pulldown_cmark (or fork them) for shortcodes, relative links etc
  • very low priority for me

I see the appeal but I don't think that feature will be coming anytime soon (if it ever comes), especially since it first requires other crates to be written first. I might consider it once gutenberg is more mature but definitely not now.

I am interested in writing a crate for parsing asciidoctor.
Do I need to write it in a specific way so that you can easily integrate it in gutenberg?

The way https://github.com/google/pulldown-cmark works very well.
I can easily extend the parser like in https://github.com/Keats/gutenberg/blob/master/src/markdown.rs#L121. Basically if I can hook into the renderer it should be ok

Keep in mind though that inputs other than markdown are not going to be added until all the important features are nailed: i18n, pagination, deploy and probably some stuff I haven't thought of yet so that's a few months away at best.

Ok, I'll wait a couple of weeks before writing such a parser, then.

Just to keep you informed: I started to work on the asciidoctor parser.

The HTML generator is implemented with a trait, so you should be able to change the result the way you want.

Please note that the API will change as I'm experimenting with different designs.

Markdown (even the extended variants) is relatively limited.
I think supporting at least one more complete format is preferable, considering the goal of the project is static site generation, rather than just a blogging platform.
For example, I am also a writer, and I write in asciidoc(tor), since that format is the best suited for it (it's actually compatible with docbook, making it not too far from latex without tex commands) - if I wanted to publish readable versions on a website, I simply couldn't use gutenberg.
For project websites, I find asciidoc also helps with writing more complete documentation, once you outgrow basic markdown - similar issue here.

All of this is basically to say that adoc support is a dealbreaker for me, though once that's in I doubt anything further would be required (since gutenberg would be essentially on feature-parity with other generators - in terms of what one can actually do with it, rather than sheer number of entries).

Just so you know, I haven't worked on my parser for a long time as I work on other projects.
If anyone is inrested to continue it, please tell me.

I wouldn't mind addind asciidoc support (but only asciidoc, I don't want to maintain n input) but a few things are required first:

  1. Rewrite the current markdown parser to separate the shortcodes from the markdown (I'm going to work on that next myself)
  2. Have a good, documented working asciidoc crate. @antoyo started one but it would need to be finished
  3. Someone to implement the asciidoc support in Gutenberg. It shouldn't be too hard after 1

I moved the feature request to the forum: https://zola.discourse.group/t/alternative-input-formats/76

Was this page helpful?
0 / 5 - 0 ratings

Related issues

svenstaro picture svenstaro  路  5Comments

veldsla picture veldsla  路  5Comments

phil-opp picture phil-opp  路  6Comments

jjbarr picture jjbarr  路  5Comments

codesections picture codesections  路  5Comments