A Pelican plugin that minifies fontawesome css and fonts to include only used icons.
git clone https://mcol.xyz/code/pelican-minify-fontawesome
Log | Files | Refs | README

commit 836186342e24230b79697af55efd8e2cb50692a6
parent 7a07c40d6da2030e9ef1d3ce3ded5bf4f82eb756
Author: mcol <mcol@posteo.net>
Date:   Tue, 15 Oct 2019 11:22:42 +0100

update readme

Mreadme.rst | 12++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/readme.rst b/readme.rst @@ -2,10 +2,12 @@ minify-fontawesome - pelican plugin =================================== minify-fontawesome is a plugin for the `pelican -<https://github.com/getpelican/pelican>`_ static site generator that extracts -only icons used in your website from fontawesome source files upon site -generation. If you only use a small number of icons it reduces served CSS from -around 70KB to around 5KB. +<https://github.com/getpelican/pelican>`_ static site generator that copies +fontawesome fonts and css into your output folder, *excluding* those that are +not found in your site. + +If you only use a small number of icons it can reduce fontawesome CSS from +~70KB to ~5KB, and fonts from ~90KB to ~2KB. At the end of site generation, the plugin identifies which icons are being used and copies the CSS and font definitions of these icons into @@ -29,3 +31,5 @@ headers, i.e. put this into page templates: .. code-block:: html <link rel="stylesheet" href="{{ SITEURL }}/theme/css/fa.css"/> + +This has only been tested with fontawesome-free-5.11.2-web so far.