summaryrefslogtreecommitdiffstats
path: root/docs/source/conf.py
diff options
context:
space:
mode:
authorCalum Lind <calumlind+deluge@gmail.com>2019-06-15 19:44:33 +0100
committerCalum Lind <calumlind+deluge@gmail.com>2019-06-15 21:06:27 +0100
commit8b62e50eb8bf81a177c4d62484a44b766c6f54a6 (patch)
tree1d10524d4a28f008dd0a95dfd33afe7773c27345 /docs/source/conf.py
parent5b315e90c508c7fb1123d137c82a3c378e4fb69c (diff)
downloaddeluge-8b62e50eb8bf81a177c4d62484a44b766c6f54a6.tar.gz
deluge-8b62e50eb8bf81a177c4d62484a44b766c6f54a6.tar.bz2
deluge-8b62e50eb8bf81a177c4d62484a44b766c6f54a6.zip
[Docs] Add spellchecking with pyenchant
- Use sphinxcontrib.spelling with custom wordlist. - Skip the checking of the modules documents as they raise false-positives. - Add a setup.py spellcheck_docs command. - Fix spelling and other issues. - Add a doc favicon.
Diffstat (limited to 'docs/source/conf.py')
-rw-r--r--docs/source/conf.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/docs/source/conf.py b/docs/source/conf.py
index 6db6da02a..450e802aa 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -49,6 +49,7 @@ extensions = [
'sphinx.ext.doctest',
'sphinx.ext.napoleon',
'sphinx.ext.coverage',
+ 'sphinxcontrib.spelling',
]
napoleon_include_init_with_doc = True
@@ -85,8 +86,7 @@ today_fmt = '%B %d, %Y'
# List of directories, relative to source directories, that shouldn't be searched
# for source files.
-# exclude_dirs = []
-# exclude_patterns = []
+exclude_patterns = []
# The reST default role (used for this markup: `text`) to use for all documents.
# default_role = None
@@ -106,6 +106,14 @@ today_fmt = '%B %d, %Y'
pygments_style = 'sphinx'
+# Options for spelling
+# --------------------
+spelling_show_suggestions = True
+spelling_word_list_filename = '../spelling_wordlist.txt'
+# Skip Deluge module rst files
+if 'spelling' in sys.argv or 'spellcheck_docs' in sys.argv:
+ exclude_patterns += ['modules']
+
# Options for HTML output
# -----------------------
html_theme = 'sphinx_rtd_theme'
@@ -132,7 +140,7 @@ html_css_files = [
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
-# html_favicon = None
+html_favicon = '../../deluge/ui/data/pixmaps/deluge.ico'
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,