A Sphinx theme for Faculty projects.
Project description
faculty-sphinx-theme is a Sphinx theme for Faculty projects. It’s based on the Read the Docs theme, but with Faculty branding and an optional navigation bar for use in the Faculty platform docs.
Installation
pip install faculty-sphinx-theme
Usage
Install faculty-sphinx-theme and configure your Sphinx project to use the theme. In your project’s conf.py, add faculty_sphinx_theme to the list of enabled extensions:
extensions = [
"faculty_sphinx_theme",
# Plus any other extensions you are using
]
and modify the html_theme setting to:
html_theme = "faculty-sphinx-theme"
Theme options
The theme provides an optional extra navbar with custom links. To enable it, use the faculty_navbar settings. You’ll probably also want to set the faculty_navbar_root setting which defines the link on the “Faculty logo”:
html_theme_options = {
"faculty_navbar": True,
"faculty_navbar_root": "https://docs.faculty.ai/",
}
To add entries to the navbar, add sections to the faculty_navbar_content setting:
html_theme_options = {
"faculty_navbar": True,
"faculty_navbar_root": "https://docs.faculty.ai/",
"faculty_navbar_content": [
{"title": "Section 1", "url": "https://sectionone.com/"},
{"title": "Section 2", "url": "https://sectiontwo.com/"},
]
}
You can also add menu items that appear on hover below the section headings. To add these, use the entries key on a section:
html_theme_options = {
"faculty_navbar": True,
"faculty_navbar_root": "https://docs.faculty.ai/",
"faculty_navbar_content": [
{
"title": "Section 1",
"url": "https://sectionone.com/",
"entries": [
{
"title": "Section 1.1",
"url": "https://sectionone.com/one",
},
{
"title": "Section 1.2",
"url": "https://sectionone.com/one",
},
]
},
{"title": "Section 2", "url": "https://sectiontwo.com/"},
]
}
It’s also possible to mark sections and entries as external, meaning they will open in a separate tab, or to omit the URL entirely for e.g. section headings:
html_theme_options = {
"faculty_navbar": True,
"faculty_navbar_root": "https://docs.faculty.ai/",
"faculty_navbar_content": [
{
"title": "No URL",
"entries": [
{
"title": "External link",
"url": "https://external.com/",
"external": True
},
]
},
{"title": "Section 2", "url": "https://sectiontwo.com/"},
]
}
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file faculty-sphinx-theme-0.3.1.tar.gz
.
File metadata
- Download URL: faculty-sphinx-theme-0.3.1.tar.gz
- Upload date:
- Size: 16.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d8e7d578067da3645df38b848e6764ff0f51bd9058c005af57c8e56e22b3f9f |
|
MD5 | b267cd83e33c71fe3abccb61a734dd51 |
|
BLAKE2b-256 | 323170d721618532d5cc0ca8849bd8ff0fba7289e55171e10860ec96e8e1a9a9 |
File details
Details for the file faculty_sphinx_theme-0.3.1-py2.py3-none-any.whl
.
File metadata
- Download URL: faculty_sphinx_theme-0.3.1-py2.py3-none-any.whl
- Upload date:
- Size: 15.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | baec629ac05231a8d0076e3ac2e5c5c31d419430d26d672f2390d7d37f6d1690 |
|
MD5 | 1c80052d033ebeacaf1a5114a98e18ef |
|
BLAKE2b-256 | e7e9506a70a9813c6cc49daa92ff765170ada8bdf68e8748b38be39e5ba2d9d4 |