在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:msavy/gitbook-plugin-asciidoc-admonition-icons开源软件地址:https://github.com/msavy/gitbook-plugin-asciidoc-admonition-icons开源编程语言:JavaScript 61.2%开源软件介绍: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. ExamplesConfigurationInstallationIn {
"plugins": ["asciidoc-admonition-icons"]
} Basic ConfigurationOverride the default configuration in the
The entire set of defaults are shown here for illustrative purposes, but you need only provide those you're overriding: Example book.json configuration: "pluginsConfig": {
"admonitions": {
"note": {
"classes": "fa icon-note",
"title": "Note",
"content": "\uf05a"
},
"tip": {
"classes": "fa icon-tip",
"title": "Tip",
"content": "\uf0eb"
},
"important": {
"classes": "fa icon-important",
"title": "Important",
"content": "\uf06a"
},
"caution": {
"classes": "fa icon-caution",
"title": "Caution",
"content": "\uf06d"
},
"warning": {
"classes": "fa icon-warning",
"title": "Warning",
"content": "\uf071"
}
}
} For example, to override the "pluginsConfig": {
"admonitions": {
"warning": {
"classes": "fa icon-tip",
"title": "Tip",
"content": "\uf197"
}
}
} Now, it will look something like: Overriding StyleYou can override the default CSS in (at least) two ways:
Example colour override in style/website.css: .icon-tip {
color: rgb(243, 21, 243, 0.7) !important;
} Refer to the GitBook documentation about including user CSS. ProvenanceThe default Less/CSS is derived from the apiman blog theme, which is in turn derived from Asciidoctor default theme. Thanks to them. 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. LicenseWhere appropriate, code is copyright 2017, Marc Savy [email protected]. Released under Apache License, Version 2.0. Footnotes
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论