Skip to content

Commit 53f101c

Browse files
committed
Update docs config: auto-detect version, remove Travis button
- Read version/release from emails.__version__ instead of hardcoded 0.5 - Remove travis_button option from theme configs (Travis CI is no longer used) - Fix intersphinx_mapping format for modern Sphinx
1 parent 1819154 commit 53f101c

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

docs/conf.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
import sys, os
22
sys.path.append(os.path.abspath('_themes'))
3+
sys.path.append(os.path.abspath('..'))
34
sys.path.append(os.path.abspath('.'))
45

56
from conf_base import *
67
from conf_theme_alabaster import *
78

89
#from conf_theme_flask import *
910

10-
version = '0.5'
11-
release = '0.5.1'
11+
from emails import __version__ as _emails_version
12+
version = '.'.join(_emails_version.split('.')[:2])
13+
release = _emails_version
1214
html_theme_path = ['_themes', ] + html_theme_path

docs/conf_base.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@
117117
html_theme_options = {
118118
'github_user': 'lavr',
119119
'github_repo': 'python-emails',
120-
'travis_button': True
121120
}
122121

123122
# Theme options are theme-specific and customize the look and feel of a theme
@@ -279,4 +278,4 @@
279278

280279

281280
# Example configuration for intersphinx: refer to the Python standard library.
282-
intersphinx_mapping = {'http://docs.python.org/': None}
281+
intersphinx_mapping = {'python': ('https://docs.python.org/3', None)}

docs/conf_theme_alabaster.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,5 @@
1111
'github_user': 'lavr',
1212
'github_repo': 'python-emails',
1313
'github_banner': True,
14-
'travis_button': True,
1514
'code_font_size': '0.8em'
1615
}

0 commit comments

Comments
 (0)