Search code examples
htmlfrontendpython-sphinxrestructuredtext

Why do some fontawesome icons not render in the html?


I am trying to add some fontawesome icons to a html document that is rendered to html from rst. Some icons are rendered and some are not.

This is the index.rst file:

Test page
================================

Here is a test Table

.. csv-table::
   :stub-columns: 1
   :header: , Column1 |globe|, Column2 |grapes|, Column3 |bolt|, Column4 |wrench2|, Column5 |graph|

   Row1 |wrench|,, some element, element 2, element 3, test
   Row2 |flask|,, , element row 2, element row 2, test
   


.. toctree::
   :hidden:

   The Ecosystem <self>


.. |wrench2| raw:: html

   <i class="fa fa-wrench"></i>

.. |wrench| raw:: html

   <i class="fa fa-wrench"></i>

.. |graph| raw:: html

   <i class="fa fa-diagram-project"></i>

.. |grapes| raw:: html

   <i class="fa fa-grapes"></i>

.. |flask| raw:: html

   <i class="fa fa-flask"></i>

.. |bolt| raw:: html

   <i class="fa fa-bolt"></i>

.. |globe| raw:: html

   <i class="fa fa-globe"></i>

and the conf.py file is HERE and the custom.css file is HERE. The command I use to create the documentation is:

sphinx-build -M html source build -v

where you have the source files in source. You have to install some extra theme:

pip install sphinx-bluebrain-theme

In the end I get a render like this

enter image description here

where there are icons for Column 1, 3 and 4, but missing for the other columns. But as far as I have seen all is the same.

How can I fix this problem?


Solution

  • From the icons it looks like you are using version 4.0 https://fontawesome.com/v4/icons/

    The missing icons were added in later editions.