Sphinx Spelling Extension

8.0.2 · active · verified Fri Apr 10

sphinxcontrib.spelling is a spelling checker extension for Sphinx-based documentation. It leverages PyEnchant to analyze reStructuredText and Markdown files, generating reports of misspelled words. The current version is 8.0.2, and the project maintains an active development with regular releases addressing bugs and adding features. [1, 3, 11, 12, 14]

Warnings

Install

Imports

Quickstart

To quickly set up `sphinxcontrib-spelling`, first ensure PyEnchant and the extension are installed. Then, configure your Sphinx `conf.py` to include the extension and define basic spelling options like language and custom word lists. Finally, run the `sphinx-build` command with the `-b spelling` option to execute the spell checker, which will output misspelled words to the console and a log file. [4, 8, 9, 15]

# 1. Install PyEnchant and sphinxcontrib-spelling (see install instructions).
# 2. In your Sphinx project's conf.py file:

extensions = [
    'sphinx.ext.autodoc',
    'sphinx.ext.napoleon',
    'sphinxcontrib.spelling'
]

spelling_lang = 'en_US'
spelling_word_list_filename = ['spelling_wordlist.txt']
spelling_show_suggestions = True

# 3. Create a 'spelling_wordlist.txt' file in your project root with custom words (one per line).
#    Example: 'MyBrandName', 'JargonTerm'

# 4. Build your documentation to check spelling. Run this command in your project root:
#    sphinx-build -b spelling docs/source docs/build/spelling
#    (Assuming 'docs/source' is your source directory and 'docs/build' is your build directory.)

view raw JSON →