Skip to content
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

Document how to create a new converter (or extend an existing one) #4136

Closed
mojavelinux opened this issue Aug 16, 2021 · 3 comments
Closed
Assignees
Labels
documentation v2.0.17 Issues resolved in the 2.0.17 release v2.1.0 Issues resolved in the 2.1.0 release.
Milestone

Comments

@mojavelinux
Copy link
Member

Although covered in the API docs, the formal documentation does not explain how to create a new converter or extend an existing one (including built-in converters).

We could consider putting this new page under Extensions. Though it might be better to add the page under a new category named Converters, and moving the Available Converters page under it too.

Here's the existing information on the topic: https://github.com/asciidoctor/asciidoctor/blob/master/lib/asciidoctor/converter.rb#L4-L43

@mojavelinux
Copy link
Member Author

For reference, both AsciidoctorJ and Asciidoctor.js have a page on how to make a custom converter for their respective platforms.

@mojavelinux
Copy link
Member Author

This page should list all the contexts (both block and inline) that the base converter maps to a handler method and the name of the method. It should then explain that you can override the convert method to customize this context to method name mapping.

@mojavelinux mojavelinux self-assigned this Sep 15, 2021
mojavelinux added a commit to mojavelinux/asciidoctor that referenced this issue Sep 18, 2021
mojavelinux added a commit to mojavelinux/asciidoctor that referenced this issue Sep 18, 2021
@mojavelinux
Copy link
Member Author

Backport this change to 2.0.x.

@mojavelinux mojavelinux added this to the v2.1.x milestone Sep 18, 2021
mojavelinux added a commit to mojavelinux/asciidoctor that referenced this issue Sep 18, 2021
mojavelinux added a commit to mojavelinux/asciidoctor that referenced this issue Sep 19, 2021
mojavelinux added a commit to mojavelinux/asciidoctor that referenced this issue Sep 19, 2021
mojavelinux added a commit to mojavelinux/asciidoctor that referenced this issue Sep 19, 2021
mojavelinux added a commit to mojavelinux/asciidoctor that referenced this issue Sep 20, 2021
@mojavelinux mojavelinux added v2.0.17 Issues resolved in the 2.0.17 release v2.1.0 Issues resolved in the 2.1.0 release. labels Oct 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation v2.0.17 Issues resolved in the 2.0.17 release v2.1.0 Issues resolved in the 2.1.0 release.
Projects
None yet
Development

No branches or pull requests

1 participant