GitBook Plugin: Provides font icons for AsciiDoc admonition blocks.
Stars, issues, PRs, etc, on GitHub @ msavy/gitbook-plugin-asciidoc-admonition-icons.
As of publishing, the GitBook AsciiDoc 3.x.x rendering pipeline does not support icons for admonition blocks, providing an inconspicuous, text-only representation:
With this plugin, admonition blocks are altered to provide the missing icons:
The default styling provides a similar look-and-feel to the Asciidoctor's standard theme; with FontAwesome icons and a comparable colour scheme. Naturally, you can override both the glyphs and styling.
Refer to the Configuration section for more detail.
asciidoc-admonition-icons to your
Override the default configuration in the
pluginsConfig.admonitions section of
- The 5 standard AsciiDoc admonition types are available, with the following mutable attributes :
classes: CSS classes of the admonition icon container.
title: HTML title attribute of admonition icon container.
content: Unicode value of glyph to use.
The entire set of defaults are shown here for illustrative purposes, but you need only provide those you're overriding:
Example book.json configuration:
For example, to override the
TIP admonition type, you could alter the
content field to be something else:
Now, it will look something like:
You can override the default CSS in (at least) two ways:
- Change the classes attribute(s) and provide your own style.
- Override or extend the existing CSS. You may need to use the
!importantproperty in some circumstances.
Example colour override in style/website.css:
Refer to the GitBook documentation about including user CSS.
I initially forked (a fork of) https://github.com/erixtekila/gitbook-plugin-richquotes, but what you see here bears little resemblance to it; however, it provided an excellent skeleton for a neophyte.
- NOTE, TIP, IMPORTANT, CAUTION, WARNING