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() }}
<link href="http://netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
{% 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
0.0.5
=====
- correction setup.py not call sphinx_fontawesome
0.0.4
=====
- correction REQUIREMENT
0.0.3
=====
- add newline after prolog
- update list icons
- update version css in README
0.0.2
=====
- css for list of task in README
- manage alias
0.0.1
=====
initialize extension
Raw data
{
"_id": null,
"home_page": "https://github.com/fraoustin/sphinx_fontawesome",
"name": "sphinx_fontawesome",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "Fr\u00e9d\u00e9ric Aoustin",
"author_email": "fraoustin@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/e0/c5/9c14765c7f4721a7df3dc3710e3ce041b0042f91c8c75991434405657c30/sphinx_fontawesome-0.0.6.tar.gz",
"platform": "",
"description": "sphinx fontawesome\r\n##################\r\n\r\nIt is a extension for sphinx.\r\n\r\nAdd directive for use fontawesome \r\n\r\nInstallation\r\n------------\r\n\r\n::\r\n\r\n pip install sphinx_fontawesome\r\n\r\n\r\nOr\r\n\r\n::\r\n\r\n git clone https://github.com/fraoustin/sphinx_fontawesome.git\r\n cd sphinx_fontawesome\r\n python setup.py install\r\n\r\nUse\r\n---\r\n\r\nIn your conf.py\r\n\r\n::\r\n\r\n import sphinx_fontawesome\r\n extensions = ['sphinx_fontawesome']\r\n\r\nIn your rst file, you can use\r\n\r\n* directive\r\n\r\n::\r\n\r\n .. fa:: check\r\n\r\n* role\r\n\r\n::\r\n\r\n :fa:`check`\r\n :fa:`check lg`\r\n :fa:`square-o`\r\n\r\n* substitution\r\n\r\n::\r\n\r\n |check|\r\n |square-o|\r\n\r\nIf you have changed the value of rst_prolog in your conf.py, and you'd like to use subsitution you\r\ncan add ``sphinx_fontawesome.prolog`` to it.\r\n\r\n::\r\n\r\n rst_prolog = sphinx_fontawesome.prolog + \"my prolog\"\r\n\r\nFor add css fontawesome, you can cssfiles option of your theme\r\n\r\n::\r\n\r\n html_theme_options = {\r\n 'cssfiles': [\"http://netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css\"]\r\n }\r\n\r\nor create _templates/layout.html\r\n\r\n::\r\n\r\n {%- extends \"yourtheme/layout.html\" %}\r\n {%- block extrahead %}\r\n {{ super() }}\r\n <link href=\"http://netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css\" rel=\"stylesheet\">\r\n {% endblock %}\r\n\r\nYou can generate todo list if you add in css (as font-awesome css)\r\n\r\n::\r\n table.field-list th.field-name {\r\n color: white;\r\n }\r\n\r\n table.field-list th.field-name .fa {\r\n color: black;\r\n }\r\n\r\nand write todo list\r\n\r\n::\r\n\r\n :|o|: task 1\r\n :|x|: task 2\r\n :|x|: task 3\r\n\n\n0.0.5\n=====\n\n- correction setup.py not call sphinx_fontawesome\n\n0.0.4\n=====\n\n- correction REQUIREMENT\n\n0.0.3\n=====\n\n- add newline after prolog\n- update list icons\n- update version css in README\n\n0.0.2\n=====\n\n- css for list of task in README\n- manage alias\n\n0.0.1\n=====\n\ninitialize extension\n",
"bugtrack_url": null,
"license": "",
"summary": "add directive for fontawesome in sphinx",
"version": "0.0.6",
"project_urls": {
"Homepage": "https://github.com/fraoustin/sphinx_fontawesome"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e0c59c14765c7f4721a7df3dc3710e3ce041b0042f91c8c75991434405657c30",
"md5": "5775424d7ce61260a7bf1289866eba85",
"sha256": "fa38d32f1654ad61f442096965f4069c074f37d7f2fadfa37f46b393938a5bdb"
},
"downloads": -1,
"filename": "sphinx_fontawesome-0.0.6.tar.gz",
"has_sig": false,
"md5_digest": "5775424d7ce61260a7bf1289866eba85",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 22385,
"upload_time": "2017-09-24T10:41:17",
"upload_time_iso_8601": "2017-09-24T10:41:17.113978Z",
"url": "https://files.pythonhosted.org/packages/e0/c5/9c14765c7f4721a7df3dc3710e3ce041b0042f91c8c75991434405657c30/sphinx_fontawesome-0.0.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2017-09-24 10:41:17",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "fraoustin",
"github_project": "sphinx_fontawesome",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "sphinx_fontawesome"
}