Skip to content

Commit

Permalink
resolves asciidoctor#126 allow AsciiDoc attributes to be defined on a…
Browse files Browse the repository at this point in the history
…sciidoc key
  • Loading branch information
mojavelinux committed Jun 2, 2019
1 parent e6b7f6d commit 16d532d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/jekyll-asciidoc/converter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ def initialize config
'site-url' => config['url'],
}
attrs = asciidoctor_config[:attributes] = compile_attributes asciidoctor_config[:attributes],
((site_attributes.merge ImplicitAttributes).merge DefaultAttributes)
(compile_attributes asciidoc_config['attributes'],
((site_attributes.merge ImplicitAttributes).merge DefaultAttributes))
if (imagesdir = attrs['imagesdir']) && !(attrs.key? 'imagesoutdir') && (imagesdir.start_with? '/')
attrs['imagesoutdir'] = ::File.join dest, (imagesdir.chomp '@')
end
Expand Down
5 changes: 4 additions & 1 deletion spec/fixtures/attributes_as_hash/_config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
gems:
- jekyll-asciidoc
asciidoctor:
asciidoc:
processor: asciidoctor
attributes:
icons: font
asciidoctor:
attributes:
sectanchors: ''
table-caption: null

0 comments on commit 16d532d

Please sign in to comment.