Skip to content

Add support for native Go implementation of AsciiDoc by using libasciidoc #5672

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

odknt
Copy link

@odknt odknt commented Feb 3, 2019

Close #1435

Render asciidoc by using libasciidoc if useLibasciidoc is true.

@CLAassistant
Copy link

CLAassistant commented Feb 3, 2019

CLA assistant check
All committers have signed the CLA.

@moorereason
Copy link
Contributor

We're aware of the libasciidoc project, but I don't think it's ready for production yet.

Cc: @xcoulon

@bep
Copy link
Member

bep commented Feb 4, 2019

0.1 may be a little early, yes -- but @xcoulon has been very busy lately. I'm very impressed by his recent work. I'm not familiar with AsciiDoc, so I cannot judge when this has become "good enough", but I can say this:

  • My thought has always that the current AsciiDoc handling is something temporary until something native happens. So, when we do add this to Hugo, the native implementation will be the default, with a flag to use "the old".

@xcoulon
Copy link

xcoulon commented Feb 4, 2019

thanks for this PR @odknt, it was actually on my TODO list for a little later, once libasciidoc would have a better support of the Asciidoc syntax. And the plan is actually to use a feature toggle (as you did) to make sure that it's set at an "experimental" level for a bit (while Asciidoctor would remain the default runtime to process the files).

Thanks for the feedback @bep! I hope I can get more features soon (as time allows), and we should definitely discuss about the info/metadata that libasciidoc should return upon processing. I'm thinking about the doc title, author and ToC for instance, but there may be also other pieces of info that it should return to integrate nicely in Hugo.

@odknt
Copy link
Author

odknt commented Feb 6, 2019

@bep @moorereason @xcoulon Thanks for checking.

May be @moorereason is right. I found issue related asciidoc in hugo and libasciidoc.
I may need to fix them ahead of this PR.

Is there a possibility to be merge this PR?
In that case I want to add commit that use parser and renderer/html5 instead of libasciidoc.ConvertToHTML() for TOC support.

@xcoulon
Copy link

xcoulon commented Feb 6, 2019

  • libasciidoc in panic rendering TOC if no sections.

@odknt if you found a bug in libasciidoc, would you mind opening an issue with a sample content so I can reproduce and fix the bug, please? I probably missed an edge-case with regards to the ToC ;)

@bep
Copy link
Member

bep commented Feb 6, 2019

Is there a possibility to be merge this PR?

This will have to wait. Mostly to wait for libasciidoc to be a little more mature (it looks really promising). That, and I'm currently working on some restructuring of the relevant code, which will make this integration simpler when this is ready. But thanks for your contribution.

@bep bep closed this Feb 6, 2019
@odknt
Copy link
Author

odknt commented Feb 6, 2019

OK, thanks.

@xcoulon
Copy link

xcoulon commented Feb 8, 2019

  • libasciidoc in panic rendering TOC if no sections.

@odknt if you found a bug in libasciidoc, would you mind opening an issue with a sample content so I can reproduce and fix the bug, please? I probably missed an edge-case with regards to the ToC ;)

The ToC bug in libasciidoc was fixed in bytesparadise/libasciidoc#284

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for native Go implementation of AsciiDoc
5 participants