Skip to main content

Nefertiti for Sphinx tests

Nefertiti is a theme for Sphinx that features:

  • Responsive design, based on Bootstrap 5.3.
  • Text input field to filter the index.
  • Font configuration compliant with EU's GDPR.
  • Different fonts can be used for different elements.
  • Light and dark color schemes, for normal text and code highlighted with Pygments styles.
  • Images that switch between color schemes. Released as sphinx-colorschemed-images.
  • Diverse color sets are available: blue, indigo, purple, pink, red, orange, yellow, ...
  • Header and footer links. Header links can be grouped in dropdown elements.
  • Optional highlighting of the project repository in the header.
  • Optional project version selector in the header.
  • Back-to-top button.

See it in action in sphinx-themes.org.

Tested

Index filtering

By default the index shows the content folded. Opening or closing items is remembered while browsing the documentation. To quickly find items use the input filter. The filter will display items that could be invisible within a folded item. When the user types in the input field, let us say fo, the index gets filtered with all the entries that match those two characters. So the index will display three matches: Fonts, Footer links and Footnotes. Those three entries were all folded within their sections:

The TOC on the right side

The Table of Contents, displayed on the right side, spans itself to the right border of the browser to display long items, improving readability.

Other features

Nefertiti for Sphinx comes with the following color sets. Change between them using the attribute display of the html_theme_options setting.

In order to be compliant with EU's GDPR, Nefertiti for Sphinx comes bundled with a group of fonts licensed for free distribution. Adding more fonts is explained in the User's Guide:

  • Assistant
  • Exo
  • Montserrat
  • Mulish
  • Nunito
  • Open Sans
  • Red Hat Display
  • Sofia Sans
  • Ubuntu Sans
  • Varta
  • Work Sans
  • Fira Code (monospace)
  • Red Hat Mono (monospace)
  • Ubuntu Sans Mono (monospace)

Combine up to 5 different fonts:

html_theme_options = {
    "sans_serif_font": "Nunito",
    "documentation_font": "Open Sans",
    "monospace_font": "Ubuntu Sans Mono",
    "project_name_font": "Nunito",
    "doc_headers_font": "Georgia",

    "documentation_font_size": "1.2rem",
    "monospace_font_size": "1.1rem",
}

To use it

Install the package from PyPI:

pip install sphinx-nefertiti

Edit the conf.py file of your Sphinx project and change the html_theme setting:

html_theme = "sphinx_nefertiti"

Now rebuild the docs and serve them to get a first glimpse of your site made up with Nefertiti for Sphinx. It has many customizable options worth to explore. You might want to continue reading the customization section of the docs.

To develop it

Clone the Git repository, create a Python virtual environment, and install the NodeJS packages:

git clone git@github.com:danirus/sphinx-nefertiti.git
cd sphinx-nefertiti
python3.12 -m venv venv
source venv/bin/activate
pip install -e .
nvm use --lts
npm install

Before contributing, please, install the pre-commit hook scripts:

pre-commit install

There are a comprehensive number of scripts in the package.json. Beyond them there is a Makefile that saves time when building the CSS and JavaScript bundles to deliver them within the Python package of the theme.

Further read the following sections:

License

Project distributed under the MIT License.

Metadata

Release files for sphinx-nefertiti 0.9.10

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

Source distribution (sdist)

Source distribution for sphinx-nefertiti 0.9.10
File Size Uploaded
sphinx_nefertiti-0.9.10.tar.gz 9.5 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for sphinx-nefertiti 0.9.10
File Interpreter ABI Platform
sphinx_nefertiti-0.9.10-py3-none-any.whl Python 3 none any Details

Total release size: 19.0 MB

Release files / sphinx_nefertiti-0.9.10.tar.gz

Download URL sphinx_nefertiti-0.9.10.tar.gz
Size 9.5 MB
Tags Source
SHA-256 checksum
How to use checksums
4f51c8ca0967817807188f894f1fc1d31059e7f9aa01a2c9a315adb5cefde508
BLAKE2b-256 checksum
How to use checksums
d048de6e48a830279a4d9e40f97b3f9b48c8376da3d40f6624af44c18dd5690b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.8

Release files / sphinx_nefertiti-0.9.10-py3-none-any.whl

Download URL sphinx_nefertiti-0.9.10-py3-none-any.whl
Size 9.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
73b0a408a823f8a4d140275bfa85acdd834d86402eff1ef9b39a48bb54b60c20
BLAKE2b-256 checksum
How to use checksums
a8902a8e352b8cfae818c998e0733d75a63a19af147611fbd30b226cb49aa233
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.8

Release history Release notifications | RSS feed

This release

0.9.10 This release

2 release files

0.9.9

2 release files

0.9.8

2 release files

0.9.7

2 release files

0.9.6

2 release files

0.9.5

2 release files

0.9.4

2 release files

0.9.3

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.9

2 release files

0.8.8

2 release files

0.8.7

2 release files

0.8.6

2 release files

0.8.5

2 release files

0.8.4

2 release files

0.8.3

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.5

2 release files

0.7.4

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.12

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.2

2 release files

0.1.1

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