diff --git a/.readthedocs.yml b/.readthedocs.yml new file mode 100644 index 0000000..9c8871b --- /dev/null +++ b/.readthedocs.yml @@ -0,0 +1,16 @@ +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +version: 2 + +sphinx: + configuration: docs/conf.py + builder: dirhtml + +# Additional formats to build: +formats: all + +python: + version: 3.7 + install: + - requirements: docs/requirements.txt diff --git a/AUTHORS.txt b/AUTHORS.txt index 285121b..a8c8226 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -1,31 +1,5 @@ Anymail ======= -Mike Edmunds -Calvin Jeong -Peter Wu -Charlie DeTar -Jonathan Baugh -Noel Rignon -Josh Kersey - - -Anymail was forked from Djrill, which included contributions from: - -Kenneth Love -Chris Jones -Mike Edmunds -ArnaudF -Théo Crevon -Rafael E. Belliard -Jared Morse -peillis -José Padilla -Jens Alm -Eric Hennings -Michael Hobbs -Sameer Al-Sakran -Kyle Gibson -Wes Winham -nikolay-saskovets -William Hector +Please see https://github.com/anymail/django-anymail/graphs/contributors +for the complete list of Anymail contributors. diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 32457c0..e9509c0 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1093,34 +1093,34 @@ Features .. GitHub issue and user links (GitHub auto-linking doesn't work in Sphinx) -.. _#14: https://github.com/anymail/issues/14 -.. _#24: https://github.com/anymail/issues/24 -.. _#32: https://github.com/anymail/issues/32 -.. _#34: https://github.com/anymail/issues/34 -.. _#39: https://github.com/anymail/issues/39 -.. _#41: https://github.com/anymail/issues/41 -.. _#44: https://github.com/anymail/issues/44 -.. _#48: https://github.com/anymail/issues/48 -.. _#49: https://github.com/anymail/issues/49 -.. _#59: https://github.com/anymail/issues/59 -.. _#60: https://github.com/anymail/issues/60 -.. _#62: https://github.com/anymail/issues/62 -.. _#67: https://github.com/anymail/issues/67 -.. _#76: https://github.com/anymail/issues/76 -.. _#77: https://github.com/anymail/issues/77 -.. _#80: https://github.com/anymail/issues/80 -.. _#85: https://github.com/anymail/issues/85 -.. _#91: https://github.com/anymail/issues/91 -.. _#99: https://github.com/anymail/issues/99 -.. _#106: https://github.com/anymail/issues/106 -.. _#108: https://github.com/anymail/issues/108 -.. _#110: https://github.com/anymail/issues/110 -.. _#111: https://github.com/anymail/issues/111 -.. _#112: https://github.com/anymail/issues/112 -.. _#115: https://github.com/anymail/issues/115 -.. _#147: https://github.com/anymail/issues/147 -.. _#148: https://github.com/anymail/issues/148 -.. _#153: https://github.com/anymail/issues/153 +.. _#14: https://github.com/anymail/django-anymail/issues/14 +.. _#24: https://github.com/anymail/django-anymail/issues/24 +.. _#32: https://github.com/anymail/django-anymail/issues/32 +.. _#34: https://github.com/anymail/django-anymail/issues/34 +.. _#39: https://github.com/anymail/django-anymail/issues/39 +.. _#41: https://github.com/anymail/django-anymail/issues/41 +.. _#44: https://github.com/anymail/django-anymail/issues/44 +.. _#48: https://github.com/anymail/django-anymail/issues/48 +.. _#49: https://github.com/anymail/django-anymail/issues/49 +.. _#59: https://github.com/anymail/django-anymail/issues/59 +.. _#60: https://github.com/anymail/django-anymail/issues/60 +.. _#62: https://github.com/anymail/django-anymail/issues/62 +.. _#67: https://github.com/anymail/django-anymail/issues/67 +.. _#76: https://github.com/anymail/django-anymail/issues/76 +.. _#77: https://github.com/anymail/django-anymail/issues/77 +.. _#80: https://github.com/anymail/django-anymail/issues/80 +.. _#85: https://github.com/anymail/django-anymail/issues/85 +.. _#91: https://github.com/anymail/django-anymail/issues/91 +.. _#99: https://github.com/anymail/django-anymail/issues/99 +.. _#106: https://github.com/anymail/django-anymail/issues/106 +.. _#108: https://github.com/anymail/django-anymail/issues/108 +.. _#110: https://github.com/anymail/django-anymail/issues/110 +.. _#111: https://github.com/anymail/django-anymail/issues/111 +.. _#112: https://github.com/anymail/django-anymail/issues/112 +.. _#115: https://github.com/anymail/django-anymail/issues/115 +.. _#147: https://github.com/anymail/django-anymail/issues/147 +.. _#148: https://github.com/anymail/django-anymail/issues/148 +.. _#153: https://github.com/anymail/django-anymail/issues/153 .. _@ailionx: https://github.com/ailionx .. _@alee: https://github.com/alee diff --git a/docs/_readme/template.txt b/docs/_readme/template.txt index 50f679e..effe895 100644 --- a/docs/_readme/template.txt +++ b/docs/_readme/template.txt @@ -1,20 +1,25 @@ %(head_prefix)s %(head)s - - - - - + + + + + @@ -22,16 +27,16 @@
- + -
+
@@ -45,7 +50,7 @@
-
+
%(body_suffix)s diff --git a/docs/_static/anymail-theme.css b/docs/_static/anymail-theme.css index 40c27d6..2c12c9a 100644 --- a/docs/_static/anymail-theme.css +++ b/docs/_static/anymail-theme.css @@ -1,31 +1,9 @@ /* Anymail modifications to sphinx-rtd-theme styles */ -/* List item spacing: https://github.com/rtfd/sphinx_rtd_theme/issues/590 */ -/* Regression: https://github.com/rtfd/sphinx_rtd_theme/issues/705 */ -.rst-content .section ol li p:last-child, -.rst-content .section ul li p:last-child { - margin-bottom: 24px; -} - - -/* Pygments shell/console prompt: */ -.highlight .gp { - /* The RTD theme shows prompts the same color as other code. - We want to distinguish them (like most Pygments themes do). */ - color: #d14; - - /* Exclude prompt characters when copying from highlighted code. */ - user-select: none; - -moz-user-select: none; - -webkit-user-select: none; - -ms-user-select: none; -} - /* Sticky table first column (used for ESP feature matrix) */ table.sticky-left td:first-of-type, table.sticky-left th:first-of-type { - position: -webkit-sticky; /* Safari */ position: sticky; left: 0; background-color: #fcfcfc; /* override transparent from .wy-table td */ @@ -36,7 +14,6 @@ table.sticky-left th:first-of-type[colspan] > p { since those always wrap a rubric

(in the specific table that uses this), just make the

sticky within the . */ display: inline-block; - position: -webkit-sticky; /* Safari */ position: sticky; left: 17px; /* (.wy-table $table-padding-size) + (docutils border="1" in html) */ } @@ -57,12 +34,12 @@ table.sticky-left th:first-of-type[colspan] > p { https://github.com/rtfd/sphinx_rtd_theme/issues/92 */ .rst-content a code.xref { - color: #2980B9; - font-weight: inherit; + color: inherit; + /*font-weight: inherit;*/ } .rst-content a:hover code.xref { - color: #3091d1; + color: inherit; } .rst-content a:visited code.xref { - color: #9B59B6; + color: inherit; } diff --git a/docs/_static/version-alert.js b/docs/_static/version-alert.js index 6183307..0c98bc1 100644 --- a/docs/_static/version-alert.js +++ b/docs/_static/version-alert.js @@ -27,4 +27,8 @@ function warnOnLatestVersion() { parent.insertBefore(warning, parent.firstChild); } -document.addEventListener('DOMContentLoaded', warnOnLatestVersion); +if (document.readyState === 'loading') { + document.addEventListener('DOMContentLoaded', warnOnLatestVersion); +} else { + warnOnLatestVersion(); +} diff --git a/docs/conf.py b/docs/conf.py index 19f2d80..9304c37 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -11,20 +11,25 @@ import os import sys -on_rtd = os.environ.get('READTHEDOCS', None) == 'True' +from pathlib import Path + +ON_READTHEDOCS = os.environ.get('READTHEDOCS', None) == 'True' +DOCS_PATH = Path(__file__).parent +PROJECT_ROOT_PATH = DOCS_PATH.parent # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. -sys.path.insert(0, os.path.abspath('..')) +sys.path.insert(0, PROJECT_ROOT_PATH.resolve()) # define __version__ and __minor_version__ from ../anymail/_version.py, # but without importing from anymail (which would make docs dependent on Django, etc.) __version__ = "UNSET" __minor_version__ = "UNSET" -with open("../anymail/_version.py") as f: - code = compile(f.read(), "../anymail/_version.py", 'exec') - exec(code) +version_path = PROJECT_ROOT_PATH / "anymail/_version.py" +code = compile(version_path.read_text(), version_path, 'exec') +exec(code) + # -- General configuration ----------------------------------------------------- @@ -50,7 +55,7 @@ master_doc = 'index' # General information about the project. project = 'Anymail' # noinspection PyShadowingBuiltins -copyright = 'Anymail contributors (see AUTHORS.txt)' +copyright = 'Anymail contributors' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -100,11 +105,11 @@ pygments_style = 'sphinx' # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -if not on_rtd: # only import and set the theme if we're building docs locally +if not ON_READTHEDOCS: # only import and set the theme if we're building docs locally import sphinx_rtd_theme # this seems to come with sphinx; if not, pip install it html_theme = 'sphinx_rtd_theme' html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] -# if on_rtd, readthedocs.org uses their theme by default (and specifying it here breaks them) +# else readthedocs.org uses their theme by default (and specifying it here breaks them) # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the @@ -202,7 +207,7 @@ latex_elements = { # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ ('index', 'Anymail.tex', 'Anymail Documentation', - 'Anymail contributors (see AUTHORS.txt)', 'manual'), + 'Anymail contributors', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of @@ -232,7 +237,7 @@ latex_documents = [ # (source start file, name, description, authors, manual section). man_pages = [ ('index', 'anymail', 'Anymail Documentation', - ['Anymail contributors (see AUTHORS.txt)'], 1) + ['Anymail contributors'], 1) ] # If true, show URL addresses after external links. @@ -246,7 +251,7 @@ man_pages = [ # dir menu entry, description, category) texinfo_documents = [ ('index', 'Anymail', 'Anymail Documentation', - 'Anymail contributors (see AUTHORS.txt)', 'Anymail', 'Multi-ESP transactional email for Django.', + 'Anymail contributors', 'Anymail', 'Multi-ESP transactional email for Django.', 'Miscellaneous'), ] @@ -275,10 +280,13 @@ intersphinx_mapping = { def setup(app): - app.add_stylesheet("anymail-theme.css") - app.add_javascript("anymail-config.js") - app.add_javascript("version-alert.js") - app.add_javascript("https://unpkg.com/rate-the-docs") + app.add_css_file("anymail-theme.css") + # Inline