mirror of
https://github.com/sprockets/sprockets.mixins.mediatype.git
synced 2024-12-27 11:17:30 +00:00
Using sphinx-rtd-theme locally as well.
This commit is contained in:
parent
118c610d3c
commit
e26a94778b
3 changed files with 19 additions and 47 deletions
26
docs/conf.py
26
docs/conf.py
|
@ -1,37 +1,35 @@
|
|||
import os
|
||||
|
||||
import pkg_resources
|
||||
|
||||
needs_sphinx = '1.0'
|
||||
needs_sphinx = '4.0'
|
||||
extensions = ['sphinx.ext.autodoc',
|
||||
'sphinx.ext.viewcode',
|
||||
'sphinx.ext.intersphinx',
|
||||
'sphinx.ext.extlinks',
|
||||
'sphinxcontrib.autohttp.tornado']
|
||||
'sphinxcontrib.httpdomain']
|
||||
master_doc = 'index'
|
||||
project = 'sprockets.mixins.mediatype'
|
||||
copyright = '2015-2021, AWeber Communications'
|
||||
release = pkg_resources.get_distribution('sprockets.mixins.mediatype').version
|
||||
version = '.'.join(release.split('.')[0:1])
|
||||
|
||||
html_style = 'custom.css'
|
||||
html_static_path = ['static']
|
||||
# Only install the ReadTheDocs theme when we are not running
|
||||
# in the RTD build system.
|
||||
if not os.environ.get('READTHEDOCS', None):
|
||||
import sphinx_rtd_theme
|
||||
html_theme = 'sphinx_rtd_theme'
|
||||
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
|
||||
|
||||
html_sidebars = {
|
||||
'**': ['about.html', 'navigation.html'],
|
||||
}
|
||||
html_theme_options = {
|
||||
'github_user': 'sprockets',
|
||||
'github_repo': 'sprockets.mixins.mediatype',
|
||||
'description': 'Content-Type negotation mix-in',
|
||||
'github_banner': True,
|
||||
'travis_button': True,
|
||||
'sidebar_width': '230px',
|
||||
'codecov_button': True,
|
||||
}
|
||||
|
||||
intersphinx_mapping = {
|
||||
'python': ('https://docs.python.org/3', None),
|
||||
'requests': ('https://requests.readthedocs.org/en/latest/', None),
|
||||
'sprockets': ('https://sprockets.readthedocs.org/en/latest/', None),
|
||||
'tornado': ('http://tornadoweb.org/en/latest/', None),
|
||||
'tornado': ('https://www.tornadoweb.org/en/stable/', None),
|
||||
}
|
||||
|
||||
# https://www.sphinx-doc.org/en/master/usage/extensions/extlinks.html
|
||||
|
|
32
docs/static/custom.css
vendored
32
docs/static/custom.css
vendored
|
@ -1,32 +0,0 @@
|
|||
@import url("alabaster.css");
|
||||
h1.logo {
|
||||
font-size: 12pt;
|
||||
overflow-wrap: normal;
|
||||
word-wrap: normal;
|
||||
overflow: hidden;
|
||||
margin-right: -25px; /* works together with div.body padding-left */
|
||||
}
|
||||
div.body {padding-left: 30px;}
|
||||
th.field-name {hyphens: none; -webkit-hyphens: none; -ms-hyphens: none;}
|
||||
div.document {width: 90%;}
|
||||
/* support small screens too! */
|
||||
@media screen and (max-width: 1000px) {
|
||||
div.sphinxsidebar {display: none;}
|
||||
div.document {width: 100%!important;}
|
||||
div.bodywrapper {margin-left: 0;}
|
||||
div.highlight pre {margin-right: -30px;}
|
||||
}
|
||||
@media screen and (min-width: 1000px) {
|
||||
div.bodywrapper {margin-left: default;}
|
||||
}
|
||||
/* hanging indent for class names
|
||||
* would use "text-indent: 2em hanging" if it were supported everywhere
|
||||
*/
|
||||
dl.class > dt, dl.function > dt {
|
||||
text-indent: -4em;
|
||||
padding-left: 4em;
|
||||
}
|
||||
/* add some space to wrap nicely */
|
||||
span.sig-paren::after {
|
||||
content: " ";
|
||||
}
|
|
@ -42,8 +42,14 @@ ci =
|
|||
dev =
|
||||
coverage==5.5
|
||||
flake8==3.9.2
|
||||
sphinx==4.2.0
|
||||
sphinx-rtd-theme==1.0.0
|
||||
sphinxcontrib-httpdomain==1.7.0
|
||||
tox==3.24.3
|
||||
|
||||
docs =
|
||||
sphinx==4.2.0
|
||||
sphinx-rtd-theme==1.0.0
|
||||
sphinxcontrib-httpdomain==1.7.0
|
||||
|
||||
[build_sphinx]
|
||||
fresh-env = 1
|
||||
|
|
Loading…
Reference in a new issue