Re: Add a javascript to the page generated (guard)

Posted by ch007m on
URL: https://discuss.asciidoctor.org/Add-a-javascript-to-the-page-generated-guard-tp685p704.html

Alan,

Many thanks. That works fine adding the option using asciidoctor command line ' asciidoctor -b html5 -a docinfo test.adoc' or attribute directly in the doc :docinfo:

Nevertheless, that does not work if I add the attribute to guard :

guard 'shell' do
  watch(/^*\.adoc$/) {|m|
    Asciidoctor.render_file(m[0], {
      :in_place => true,
      :attributes => {
          'backend' => 'html5',
          'linkcss' => 'true',
          'docinfo' => 'true'
      }
    })
  }
end

Cheers

Charles
Charles Moulliard
Apache Committer / Technologist Evangelist / Blogger / MiddleWare Specialist
Twitter : @cmoulliard