Closed brianjking closed 8 years ago
Please try
css
and fonts
directories under _static
directory of your sphinx project.def setup(app):
app.add_stylesheet('css/paymentfont.css')
Now you can use several way to use icons like:
Raw block
---------
.. raw:: html
<span class="pf pf-paypal"></span>
Container
---------
.. container:: pf pf-paypal
ha!
Custom Role
-----------
.. role:: paypal
:class: pf pf-paypal
Hello :paypal:`.` World!
Subustition
-----------
.. |paypal| raw:: html
<span class="pf pf-paypal"></span>
Hello |paypal| World!
@shimizukawa This works if I execute make html
locally, however, the icons do not show when using readthedocs.org.
Any tips there?
Thanks!
@shimizukawa Sorry, I'm an idiot. I just missed pushing the commit to the remote repository for the addition of the css & font folders inside of _static.
This works great, thank you!
Good to know!
Hello,
I'm using Sphinx with the ReadTheDocs Theme and building/hosting on readthedocs.org. I'm wondering how I can implement icons from https://github.com/vendocrat/PaymentFont in my Sphinx docs?
As per http://paymentfont.io/#icons I just simply enter
<span class="pf pf-paypal"></span>
as long as I've uploaded thecss
andfont
folders into my site. However, I'm not sure what modifications I need to make to conf.py or any other files to make this work properly.Thanks!