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

How do we use these extensions? #35

Closed
andreabedini opened this issue Feb 20, 2015 · 6 comments
Closed

How do we use these extensions? #35

andreabedini opened this issue Feb 20, 2015 · 6 comments

Comments

@andreabedini
Copy link

Asciidoctor version 1.5.2 mentions, in the help, an option to require ruby modules before running

    -r, --require LIBRARY            require the specified library before executing the processor (using require)
                                     may be specified more than once

I guess this can be used to load these extensions from the command line but I can't find any documentation about this. Especially it's not mentioned either here or here.

@ggrossetie
Copy link
Member

Hi @andreabedini there's a blog post explanining how to load extensions from the CLI: http://asciidoctor.org/release-notes/asciidoctor-1-5-0/#spotlight-load-extensions

Let me know if this is working for you,
Cheers.
Guillaume.

@mojavelinux
Copy link
Member

And to bring everything together, here's an example of how you would load the emoji inline macro extension:

git clone https://github.com/asciidoctor/asciidoctor-extensions-lab
asciidoctor -r ./asciidoctor-extensions-lab/lib/emoji-inline-macro.rb your-doc.adoc

Note that the -r should be the relative path from the current directory to the Ruby script that loads the extension. If the extension is bundled and installed as a Ruby gem, like asciidoctor-diagram, then you can simply pass the name, like -r asciidoctor-diagram.

Btw, we need a README for this repository that covers (at least) the following information:

  1. What extensions are available here
  2. How to load an extension from the extension lab

We should also cover how these extensions are organized to help people create new ones.

...and eventually, we need to graduate some extension out of the lab once we determine that they are stable and popular. But we'll cross that bridge when we get to it.

@mojavelinux
Copy link
Member

Are you able to load the extensions now @andreabedini? If so, perhaps we can open a new issue to add a proper README.

@andreabedini
Copy link
Author

hi @mojavelinux @Mogztter sorry for leaving you hanging. I think I did manage to get them working at some point (and in some way). Mine was perhaps a little complaint on the lack of documentation! :) thanks for all your work. I love asciidoc(or) and I want to see it succeed! especially in academia (my industry) where markdown has already some momentum behind (scholarly markdown).

@mojavelinux
Copy link
Member

I think I did manage to get them working at some point (and in some way).

Nice.

Mine was perhaps a little complaint on the lack of documentation! :)

A justified compliant indeed.

I'm going to close this and replace it with an issue to create a proper README.

@mojavelinux
Copy link
Member

Closed in favor of #44.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants