Skip to content

Commit b85b26f

Browse files
authored
Merge pull request #112 from altendky/rtd_config
2 parents addc49d + e0db0dd commit b85b26f

File tree

11 files changed

+741
-12
lines changed

11 files changed

+741
-12
lines changed

.readthedocs.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1-
# https://docs.readthedocs.io/en/latest/yaml-config.html
1+
# https://docs.readthedocs.io/en/latest/config-file/index.html
2+
version: 2
3+
24
formats:
35
- htmlzip
46
- epub
57

6-
requirements_file: ci/rtd-requirements.txt
7-
88
python:
9-
version: 3
10-
pip_install: True
9+
version: 3.7
10+
install:
11+
- requirements: docs-requirements.txt
12+
13+
sphinx:
14+
fail_on_warning: true

ci/travis.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ python setup.py sdist --formats=zip
4343
pip install dist/*.zip
4444

4545
if [ "$CHECK_DOCS" = "1" ]; then
46-
pip install -Ur ci/rtd-requirements.txt
46+
pip install -Ur docs-requirements.txt
4747
cd docs
4848
# -n (nit-picky): warn on missing references
4949
# -W: turn warnings into errors

ci/rtd-requirements.txt renamed to docs-requirements.in

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,12 @@ sphinxcontrib-trio
55
# Workaround for this weird issue:
66
# https://travis-ci.org/python-trio/pytest-trio/jobs/407495415
77
attrs >= 17.4.0
8+
# != 19.9.0rc1 for https://github.com/twisted/towncrier/issues/180
9+
towncrier != 19.9.0rc1
10+
11+
# pytest-trio's own dependencies
12+
trio >= 0.15.0
13+
async_generator >= 1.9
14+
outcome
15+
# For node.get_closest_marker
16+
pytest >= 3.6

docs-requirements.txt

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#
2+
# This file is autogenerated by pip-compile
3+
# To update, run:
4+
#
5+
# pip-compile --output-file=docs-requirements.txt docs-requirements.in
6+
#
7+
alabaster==0.7.12 # via sphinx
8+
async-generator==1.10 # via -r docs-requirements.in, trio
9+
attrs==20.2.0 # via -r docs-requirements.in, outcome, pytest, trio
10+
babel==2.8.0 # via sphinx
11+
certifi==2020.6.20 # via requests
12+
chardet==3.0.4 # via requests
13+
click==7.1.2 # via towncrier
14+
docutils==0.16 # via sphinx
15+
idna==2.10 # via requests, trio
16+
imagesize==1.2.0 # via sphinx
17+
incremental==17.5.0 # via towncrier
18+
iniconfig==1.0.1 # via pytest
19+
jinja2==2.11.2 # via sphinx, towncrier
20+
markupsafe==1.1.1 # via jinja2
21+
outcome==1.0.1 # via -r docs-requirements.in, trio
22+
packaging==20.4 # via pytest, sphinx
23+
pluggy==0.13.1 # via pytest
24+
py==1.9.0 # via pytest
25+
pygments==2.7.1 # via sphinx
26+
pyparsing==2.4.7 # via packaging
27+
pytest==6.1.1 # via -r docs-requirements.in
28+
pytz==2020.1 # via babel
29+
requests==2.24.0 # via sphinx
30+
six==1.15.0 # via packaging
31+
sniffio==1.2.0 # via trio
32+
snowballstemmer==2.0.0 # via sphinx
33+
sortedcontainers==2.2.2 # via trio
34+
sphinx-rtd-theme==0.5.0 # via -r docs-requirements.in
35+
sphinx==3.2.1 # via -r docs-requirements.in, sphinx-rtd-theme, sphinxcontrib-trio
36+
sphinxcontrib-applehelp==1.0.2 # via sphinx
37+
sphinxcontrib-devhelp==1.0.2 # via sphinx
38+
sphinxcontrib-htmlhelp==1.0.3 # via sphinx
39+
sphinxcontrib-jsmath==1.0.1 # via sphinx
40+
sphinxcontrib-qthelp==1.0.3 # via sphinx
41+
sphinxcontrib-serializinghtml==1.1.4 # via sphinx
42+
sphinxcontrib-trio==1.1.2 # via -r docs-requirements.in
43+
toml==0.10.1 # via pytest, towncrier
44+
towncrier==19.2.0 # via -r docs-requirements.in
45+
trio==0.17.0 # via -r docs-requirements.in
46+
urllib3==1.25.10 # via requests
47+
48+
# The following packages are considered to be unsafe in a requirements file:
49+
# setuptools

docs/source/_static/favicon-32.png

1.79 KB
Loading

docs/source/_static/favicon.svg

Lines changed: 177 additions & 0 deletions
Loading

docs/source/_static/hackrtd.css

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
/* Temporary hack to work around bug in rtd theme 2.0 through 2.4
2+
See https://github.com/rtfd/sphinx_rtd_theme/pull/382
3+
*/
4+
pre {
5+
line-height: normal !important;
6+
}
7+
8+
/* Make .. deprecation:: blocks visible
9+
* (by default they're entirely unstyled)
10+
*/
11+
.deprecated {
12+
background-color: #ffe13b;
13+
}
14+
15+
/* Add a snakey triskelion ornament to <hr>
16+
* https://stackoverflow.com/questions/8862344/css-hr-with-ornament/18541258#18541258
17+
* but only do it to <hr>s in the content box, b/c the RTD popup control panel
18+
* thingummy also has an <hr> in it, and putting the ornament on that looks
19+
* *really weird*. (In particular, the background color is wrong.)
20+
*/
21+
.rst-content hr:after {
22+
/* This .svg gets displayed on top of the middle of the hrule. It has a box
23+
* behind the logo that's colored to match the RTD theme body background
24+
* color (#fcfcfc), which hides the middle part of the hrule to make it
25+
* look like there's a gap in it. The size of the box determines the size
26+
* of the gap.
27+
*/
28+
background: url('ornament.svg') no-repeat top center;
29+
background-size: contain;
30+
content: "";
31+
display: block;
32+
height: 30px;
33+
position: relative;
34+
top: -15px;
35+
}
36+
37+
/* Hacks to make the upper-left logo area look nicer */
38+
39+
.wy-side-nav-search {
40+
/* Lighter background color to match logo */
41+
background-color: #d2e7fa !important;
42+
}
43+
44+
.wy-side-nav-search > a {
45+
color: #306998 !important;
46+
}
47+
48+
.wy-side-nav-search > a.logo {
49+
display: block !important;
50+
padding-bottom: 0.809em !important;
51+
}
52+
53+
.wy-side-nav-search > a img.logo {
54+
display: inline !important;
55+
padding: 20 !important;
56+
}
57+
58+
.trio-version {
59+
display: inline;
60+
/* I *cannot* figure out how to get the version text vertically centered
61+
on the logo. Oh well...
62+
height: 32px;
63+
line-height: 32px;
64+
*/
65+
}
66+
67+
.wy-side-nav-search > a {
68+
/* Mostly this is just to simplify things, so we don't have margin/padding
69+
* on both the <a> and the <img> inside it */
70+
margin: 0 !important;
71+
padding: 0 !important;
72+
}
73+
74+
/* Get rid of the weird super dark "Contents" label that wastes vertical space
75+
*/
76+
.wy-menu-vertical > p.caption {
77+
display: none !important;
78+
}
79+
80+
/* I do not like RTD's use of Roboto Slab for headlines. So force it back to
81+
* Lato (or whatever fallback it's using if Lato isn't available for some
82+
* reason). I also experimented with using Montserrat to be extra obnoxiously
83+
* on brand, but honestly you couldn't really tell so there wasn't much point
84+
* in adding page weight for that, and this is going to match the body text
85+
* better. (Montserrat for body text *definitely* didn't look good, alas.)
86+
*/
87+
h1, h2, h3, h4, h5, h6, legend, .rst-content .toctree-wrapper p.caption {
88+
font-family: inherit !important;
89+
}
90+
91+
/* Get rid of the horrible red for literal content */
92+
.rst-content tt.literal, .rst-content tt.literal, .rst-content code.literal {
93+
color: #222 !important;
94+
}
95+
96+
/* Style the "Need help?" text just underneath the search box */
97+
.trio-help-hint {
98+
line-height: normal;
99+
margin-bottom: 0;
100+
/* font-size: 12px; */
101+
font-size: 80%; /* matches the "Search docs" box */
102+
padding-top: 6px;
103+
color: #306998;
104+
text-align: center;
105+
}
106+
107+
a.trio-help-hint, .trio-help-hint a:link, .trio-help-hint a:visited {
108+
color: inherit;
109+
/* Like text-decoration: underline, but with a thinner line */
110+
text-decoration: none;
111+
border-bottom: 1px solid;
112+
}

0 commit comments

Comments
 (0)