asciidoctor / asciidoctor-diagram

:left_right_arrow: Asciidoctor diagram extension, with support for AsciiToSVG, BlockDiag (BlockDiag, SeqDiag, ActDiag, NwDiag), Ditaa, Erd, GraphViz, Mermaid, Msc, PlantUML, Shaape, SvgBob, Syntrax, UMLet, Vega, Vega-Lite and WaveDrom.
http://asciidoctor.org
MIT License
435 stars 106 forks source link

Jekyll and Asciidoctor Diagram 2.1.2: attribute 'syntrax-style' ignored (works with Asciidoctor Diagram 2.1.1) #350

Closed ianss closed 3 years ago

ianss commented 3 years ago

The attribute :syntrax-style: is ignored by Asciidoctor Diagram 2.1.2 when building a Jekyll site with the following Gemfile spec:

source 'https://rubygems.org'

gem "jekyll", "4.1.1"
gem "asciidoctor", "2.0.12"
gem "pygments.rb"
gem "aws-sdk-s3"

group :jekyll_plugins do
  gem "asciidoctor-diagram", "2.1.2"
  gem "jekyll-asciidoc"
end

Last known working Gemfile spec:

source 'https://rubygems.org'

gem "jekyll", "4.1.1"
gem "asciidoctor", "2.0.12"
gem "pygments.rb"
gem "aws-sdk-s3"

group :jekyll_plugins do
  gem "asciidoctor-diagram", "2.1.1"
  gem "jekyll-asciidoc"
end

I set the :syntrax-style: attribute in Jekyll's _config.yml file:

asciidoctor:
  safe: unsafe
  attributes:
    plantuml-config: "{site-source}/assets/plantuml/config.plantuml"
    syntrax-style: "{site-source}/assets/syntrax/syntrax.ini"
    diagram-svg-type: inline

I have tried both relative and absolute values for :syntrax-style:. Neither work with Asciidoctor Diagram 2.1.2.

My thanks to all who contribute to Asciidoctor Diagram. It's a great project and I use it regularly with Jekyll and Asciidoctor PDF.

pepijnve commented 3 years ago

In 2.1.2 I changed style to style-file for Syntrax. style conflicted with a builtin attribute Asciidoctor uses. Unfortunately that means syntrax-style also no longer works. You'll have to use syntrax-style-file instead for now. I'm going to try and restore support for syntrax-style. That's an unintended regression.

ianss commented 3 years ago

Changing the syntrax-style attribute to syntrax-style-file worked.

Many thanks for your quick response @pepijnve