为什么某些Fontawesome图标不会在HTML中呈现?

发布于 2025-02-03 07:53:22 字数 1846 浏览 1 评论 0原文

我正在尝试添加一些 fontawesome 图标 iCONS iCONS添加到html文档中,该文档呈现为> > html html来自rst。有些图标是渲染的,有些不是。

这是index.rst文件:

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>

conf.py文件是此处custom.css文件是在这里。我用来创建文档的命令是:

sphinx-build -M html source build -v

source中的源文件。 您必须安装一些额外的主题:

pip install sphinx-bluebrain-theme

最后,我得到这样的渲染

“在此处输入图像说明”

其中有第1、3和4列的图标,但其他列则缺少。但是据我所知,一切都是一样的。

如何解决此问题?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

垂暮老矣 2025-02-10 07:53:22

从图标中,看起来您正在使用4.0 https://fontawesome.com/v4/icons/

在以后的版本中添加了缺失的图标。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文