Skip to content
This repository has been archived by the owner on May 6, 2021. It is now read-only.

Commit

Permalink
Enable Asciidoctor::SafeMode::UNSAFE in plugin
Browse files Browse the repository at this point in the history
SafeMode::UNSAFE is required to use Asciidoctor-Diagram
with Jekkyl Rake plugin as it will set --destination 'tempFile'
which is outside of the doc root.
  • Loading branch information
aslakknutsen committed May 15, 2016
1 parent 87ea65c commit 75a5113
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion _plugins/asciidoc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,10 @@ def convert(content)
case @config['asciidoc']
when 'asciidoctor'
config = @config['asciidoctor'].dup
config[:safe] = Asciidoctor::SafeMode::UNSAFE
config[:attributes] = {}
config[:attributes]["imagesoutdir"] = "#{@dest}/#{@curr_page_output}"
config[:attributes]["outdir"] = "#{@dest}"
config[:attributes]["imagesdir"] = "#{@curr_page_output}"

Asciidoctor.convert(content, config)
else
Expand Down

0 comments on commit 75a5113

Please sign in to comment.