Login  Register

Re: Asciidoctor pdf - Custom admonition icons

Posted by mojavelinux on Aug 09, 2019; 8:43pm
URL: https://discuss.asciidoctor.org/Asciidoctor-pdf-Custom-admonition-icons-tp5850p7060.html

Aha! I see what it is.

In your theme, you're redefining the icon category over and over, so only the last one wins. Here's how it should look:

extends: default
admonition:
  icon:
    boilerplate:
      name: fas-lock
      stroke_color: 3F903E
      size: 24
    review:
      name: fas-clipboard
      stroke_color: FDB109
      size: 24
    guidance:
      name: fas-book
      stroke_color: 0909FD
      size: 24

Notice how all the icon types are defined under a single parent. This is a limitation imposed by the YAML language itself. If you redeclare a parent in the hierarchy, it replaces all previous declarations. (This does not affect keys that were defined in the theme you extended).

Best,

-Dan

On Fri, Aug 9, 2019 at 1:29 PM be.wood [via Asciidoctor :: Discussion] <[hidden email]> wrote:
admonition.yml
extension.rb
notice-block.rb

sample.adoc

These are the three files (with the extension.rb being placed into a notice-block folder in the lib folder). I have tried to call the admonition.yml without success.

If I run the straight asciidoctor and call the notice-block to generate HTML output I get what I expect with icons for each of the admonitions in the sample, but when I try to run it for asciidoctor-pdf I don't get anything (they are admonitions, but with no icons), and I get the error messages.

This is all on Windows with ruby installed (if that makes any difference).

I appreciate all your help (this is for an external community that will rely on what I'm doing here, hopefully to standardize document creation on Asciidoctor and GitHub).

Thank you.


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Asciidoctor-pdf-Custom-admonition-icons-tp5850p7059.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux