GithubHelp home page GithubHelp logo

Support other input formats about zola HOT 9 CLOSED

getzola avatar getzola commented on July 17, 2024 10
Support other input formats

from zola.

Comments (9)

antoyo avatar antoyo commented on July 17, 2024 8

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.

from zola.

CosmicToast avatar CosmicToast commented on July 17, 2024 8

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).

from zola.

Keats avatar Keats commented on July 17, 2024 7

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

from zola.

Keats avatar Keats commented on July 17, 2024 5

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.

from zola.

antoyo avatar antoyo commented on July 17, 2024

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?

from zola.

Keats avatar Keats commented on July 17, 2024

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.

from zola.

antoyo avatar antoyo commented on July 17, 2024

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

from zola.

antoyo avatar antoyo commented on July 17, 2024

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.

from zola.

Keats avatar Keats commented on July 17, 2024

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

from zola.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.