We're just about to put out a 0.1.0 gem, which adds the cli among (many) other features and enhancements. Although there is a cli file prior to 0.1.0, it didn't contain any runnable code.

The problem with the Rakefile seems to be an issue in how Ruby resolves the Rake version. I have an idea for how to make that failsafe. I'll submit a patch so that under no circumstances will that line cause the build to fail.

I'll post back once we have 0.1.0 out and we can work through it from there.


On Mon, Jan 28, 2013 at 4:35 PM, Rafael Benevides <benevides@redhat.com> wrote:
Hi Dan,

I tried at all cost to install asciidoctor (0.0.7/0.0.9/master) to start this migration.

For 0.0.7 and 0.0.9 (from rubygems) I got the same error:
$ asciidoctor
/usr/lib64/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- asciidoctor/cli (LoadError)

This error also happens when I built from gem build .gemspec / gem install .gem

From git repo (master branch)
I CAN use 'bundle exec asciidoctor' BUT when I try to use rake (10.0.3) I got this error:
rake aborted!
undefined method `markup=' for #<RDoc::Task:0x00000000f1bd50>
that is similar to: https://github.com/erebor/asciidoctor/pull/41#issuecomment-11742889 but I couldn't find the solution.

Jason Porter give me some help but now I'm stuck again, so basically I want to know if can you contribute with some other help to make asciidoctor run under my environment?
RHEL 6.3
Ruby 1.9.3
Gem 1.8.11
asciidoctor 0.0.9
rake 10.0.3
rdoc 3.12

Thank you.

Em 24-01-2013 08:15, Dan Allen escreveu:

I head from Jason that you're experimenting with using Asciidoctor to generate the HTML for some of the guides. I'm thrilled to here that. It also prompted me to review how Asciidoctor handles these documents. I processed the following guide:

I've come up with some observations and recommendations. But first, some general advice for using Asciidoctor.

If you are using Asciidoctor view the API, you'll want to disable SafeMode (since that's not relevant for builds) and enable full document output:

Asciidoctor.render_file('guide.asciidoc', :safe => Asciidoctor::SafeMode::UNSAFE, :header_footer => true, :in_place => true)

The :in_place option mimics the behavior of AsciiDoc of rendering to file w/ the same basename as the source file.

Coming in 0.1.0 is a cli, named asciidoctor. You'll be able to use that as a drop-in replacement for the asciidoc command.

Moving on to the feedback.

* AsciiDoc clips the label of the following xref (because of the comma in the label), whereas Asciidoctor gets it right:

  <<GettingStarted-on_linux, Installing and starting the JBoss server on Linux, Unix or Mac OS X>>

* Asciidoctor does not process the anchor:name[] macro, use [[name]] instead (best is to put it above a section title)
* Asciidoctor does not render callout numbers as icons (I recommend we use FontAwesome or CSS to accomplish this markup)
* Use a conditional block to setup the source-highlighter when using Asciidoctor:

:source-highlighter: highlightjs
:highlightjs-theme: github

Another option for source highlighting is CodeRay, which is more or less like Pygments in that it formats the code directly. You'll need to gem install coderay, then:

:source-highlighter: coderay

I noticed a couple of places where Asciidoctor was incorrectly parsing the text. I fixed them and pushed the changes. They will likely make it into 0.1.0.

If you have any questions, or have any features you'd like to see, let me know or just post the feedback in the Asciidoctor issue tracker [1].



[1] https://github.com/erebor/asciidoctor/issues?state=open

Dan Allen
Principal Software Engineer, Red Hat | Author of Seam in Action
Registered Linux User #231597

jdf-dev mailing list

Dan Allen
Principal Software Engineer, Red Hat | Author of Seam in Action
Registered Linux User #231597