Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Hello,
I'm trying to use Guard-asciidoctor plugin, and I get the following message at startup: > [#aaa02a5dde0e] undefined method `render_file' for Guard::Asciidoctor:Class and my guardfile contains: guard :asciidoctor do #watch(/^.+(\.adoc)$/) watch(/^.+(\.adoc)$/) {|m| Asciidoctor.render_file(m[0], :in_place => true, :to_dir => 'html') } #watch(/^.+(\.css)$/) end Thank for your response ! Denis |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
|
Although it's only deprecated, render_file has been replaced by convert_file. However, I think the real problem is that you have no required Asciidoctor. require 'asciidoctor' -Dan On Sun, Aug 13, 2017 at 2:10 AM, denis [via Asciidoctor :: Discussion] <[hidden email]> wrote: Hello, ... [show rest of quote] Dan Allen | @mojavelinux | https://twitter.com/mojavelinux |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
I solve my problem using:
guard :asciidoctor do #watch(/^.+(\.adoc)$/) watch(/^.+(\.adoc)$/) {|m| ::Asciidoctor.render_file(m[0], :in_place => true, :to_dir => 'html') } #watch(/^.+(\.css)$/) end :) |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
|
Ah, yes. I see. The guard file must be running inside a namespace, so you have to break out to the top level. But the name of the method is still convert_file ;) -Dan On Sun, Aug 13, 2017 at 3:05 AM, denis [via Asciidoctor :: Discussion] <[hidden email]> wrote: I solve my problem using: ... [show rest of quote] Dan Allen | @mojavelinux | https://twitter.com/mojavelinux |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
I've corrected the method name, where can I find documentation on parameters name to this method ?
I'd like to change the style sheet used.... something like that: watch(/^.+(\.adoc)$/) {|m| ::Asciidoctor.convert_file( m[0], :in_place => my_in_place, :to_dir => my_to_dir, :stylesheet => my_stylesheet, :style_dir => my_stylesdir ) } |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
|
See http://asciidoctor.org/docs/user-manual/#ruby-api-options For attributes, see http://asciidoctor.org/docs/user-manual/#builtin-attributes -Dan On Sun, Aug 13, 2017 at 3:17 AM, denis [via Asciidoctor :: Discussion] <[hidden email]> wrote: I've corrected the method name, where can I find documentation on parameters name to this method ? ... [show rest of quote] Dan Allen | @mojavelinux | https://twitter.com/mojavelinux |
Free forum by Nabble | Edit this page |