FontAwesome plugin for Docsify.
- Insert FontAwesome CSS into docsify document (index.html)
<link rel="stylesheet" href="//unpkg.com/@fortawesome/fontawesome-free/css/fontawesome.css" />
<link rel="stylesheet" href="//unpkg.com/@fortawesome/fontawesome-free/css/brands.css" />
<link rel="stylesheet" href="//unpkg.com/@fortawesome/fontawesome-free/css/regular.css" />
<link rel="stylesheet" href="//unpkg.com/@fortawesome/fontawesome-free/css/solid.css" />
- Then insert script plugin into same document
<script src="//unpkg.com/docsify-fontawesome/dist/docsify-fontawesome.min.js"></script>
Any text inside of :
character is processed as CSS style and converted to HTML code for FontAwesome, example:
:fas fa-home fa-fw:
This code is converted to :
<i class="fas fa-home fa-fw"></i>
- Run
npm run build
- Run
npm run example
- Go to http://localhost:3000/
View source code to understand SVG usage
- Run
npm run build
- Run
npm run example-svg
- Go to http://localhost:3000/
- Better parser to escape code sections