Skip to main content

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/"},
    ]
}

Metadata

Release files for faculty-sphinx-theme 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for faculty-sphinx-theme 0.3.1
File Size Uploaded
faculty-sphinx-theme-0.3.1.tar.gz 16.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for faculty-sphinx-theme 0.3.1
File Interpreter ABI Platform
faculty_sphinx_theme-0.3.1-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 32.3 kB

Release files / faculty-sphinx-theme-0.3.1.tar.gz

Download URL faculty-sphinx-theme-0.3.1.tar.gz
Size 16.7 kB
Tags Source
SHA-256 checksum
How to use checksums
0d8e7d578067da3645df38b848e6764ff0f51bd9058c005af57c8e56e22b3f9f
BLAKE2b-256 checksum
How to use checksums
323170d721618532d5cc0ca8849bd8ff0fba7289e55171e10860ec96e8e1a9a9
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / faculty_sphinx_theme-0.3.1-py2.py3-none-any.whl

Download URL faculty_sphinx_theme-0.3.1-py2.py3-none-any.whl
Size 15.6 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
baec629ac05231a8d0076e3ac2e5c5c31d419430d26d672f2390d7d37f6d1690
BLAKE2b-256 checksum
How to use checksums
e7e9506a70a9813c6cc49daa92ff765170ada8bdf68e8748b38be39e5ba2d9d4
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page