https://github.com/fraoustin/sphinx_fontawesome
module sphinx for add fontawesome
https://github.com/fraoustin/sphinx_fontawesome
List: sphinx_fontawesome
active sphinx
Last synced: 4 months ago
JSON representation
module sphinx for add fontawesome
- Host: GitHub
- URL: https://github.com/fraoustin/sphinx_fontawesome
- Owner: fraoustin
- License: gpl-2.0
- Created: 2015-11-20T16:49:43.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2021-08-23T13:35:31.000Z (almost 5 years ago)
- Last Synced: 2025-11-22T01:00:02.938Z (7 months ago)
- Topics: active, sphinx
- Language: Python
- Homepage:
- Size: 23.4 KB
- Stars: 13
- Watchers: 2
- Forks: 5
- Open Issues: 7
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGES.rst
- License: LICENSE
Awesome Lists containing this project
README
sphinx fontawesome
##################
It is a extension for sphinx.
Add directive for use fontawesome
Installation
------------
::
pip install sphinx_fontawesome
Or
::
git clone https://github.com/fraoustin/sphinx_fontawesome.git
cd sphinx_fontawesome
python setup.py install
Use
---
In your conf.py
::
import sphinx_fontawesome
extensions = ['sphinx_fontawesome']
In your rst file, you can use
* directive
::
.. fa:: check
* role
::
:fa:`check`
:fa:`check lg`
:fa:`square-o`
* substitution
::
|check|
|square-o|
If you have changed the value of rst_prolog in your conf.py, and you'd like to use subsitution you
can add ``sphinx_fontawesome.prolog`` to it.
::
rst_prolog = sphinx_fontawesome.prolog + "my prolog"
For add css fontawesome, you can cssfiles option of your theme
::
html_theme_options = {
'cssfiles': ["http://netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"]
}
or create _templates/layout.html
::
{%- extends "yourtheme/layout.html" %}
{%- block extrahead %}
{{ super() }}
{% endblock %}
You can generate todo list if you add in css (as font-awesome css)
::
table.field-list th.field-name {
color: white;
}
table.field-list th.field-name .fa {
color: black;
}
and write todo list
::
:|o|: task 1
:|x|: task 2
:|x|: task 3