diff --git a/docs/Makefile b/docs/Makefile index 5b4eb026a2..2333c272fe 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -54,6 +54,11 @@ html: @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." +spelling: + $(SPHINXBUILD) -b spelling $(ALLSPHINXOPTS) $(BUILDDIR)/spelling + @echo + @echo "Spellcheck complete." + dirhtml: $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml @echo diff --git a/docs/conf.py b/docs/conf.py index b8ff46164c..54f2132ebd 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -50,6 +50,7 @@ os.environ['DATABASE_ENGINE'] = 'django.db.backends.sqlite3' # ones. extensions = [ 'sphinx.ext.autodoc', + 'sphinxcontrib.spelling', ] # Add any paths that contain templates here, relative to this directory. @@ -116,6 +117,12 @@ pygments_style = 'sphinx' #keep_warnings = False +# splhinxcontrib.spelling settings + +spelling_lang = 'en_US' +spelling_word_list_filename='spelling_wordlist.txt' + + # -- Options for HTML output ---------------------------------------------- diff --git a/requirements-dev.txt b/requirements-dev.txt index d4a4634a4d..367d1ae728 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -7,3 +7,7 @@ Pillow>=2.7.0 # For coverage and PEP8 linting coverage>=3.7.0 flake8>=2.2.0 + +# For spellchecking the documentation +sphinxcontrib-spelling==2.1.1 +pyenchant==1.6.6