Skip to content

Commit a7f5425

Browse files
committed
Merge remote-tracking branch 'origin/master' into ads-served-ethically
2 parents e90d63c + 3e1651e commit a7f5425

File tree

15 files changed

+297
-124
lines changed

15 files changed

+297
-124
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
.ropeproject/
1616
_build
1717
bower_components/
18+
contrib/supervisord.log
1819
deploy/.vagrant
1920
dist/*
2021
local_settings.py
@@ -43,3 +44,4 @@ private_*
4344
readthedocs/htmlcov
4445
tags
4546
.python-version
47+
*.pyo

contrib/readme.rst

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
Running Read the Docs via Supervisord
2+
=====================================
3+
4+
This is the easiest way to start all of the commands you'll need for development
5+
in an environment relatively close to the production evironment. All you need is
6+
``supervisord`` and ``redis-server``. Installation of ``redis-server`` is
7+
outside the scope of this documentation, but once installed, all you need to run
8+
from ``supervisord`` is::
9+
10+
pip install supervisord
11+
cd contrib/
12+
supervisord
13+
14+
This will bring up a web instance for the dashboard, a web instance for
15+
documentation serving, two celery instances, and redis-server.
16+
17+
If you already are running redis-server, this will complain about the port
18+
already being in use, but will still load.
19+
20+
Debugging
21+
---------
22+
23+
To debug, set trace points like normal, with ``pdb``/``ipdb``. Then you can
24+
connect to the process by bringing it to the foreground::
25+
26+
supervisorctl fg main
27+
28+
You'll still see logging to STDERR on the main supervisord process page.

contrib/supervisord.conf

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
[supervisord]
2+
nodaemon = True
3+
directory = ../
4+
loglevel = error
5+
strip_ansi = False
6+
environment = PYTHONUNBUFFERED=1,READTHEDOCS_INSTANCE=readthedocs.org
7+
8+
[inet_http_server]
9+
port = 127.0.0.1:9001
10+
username = 🍔
11+
password = 🍟
12+
13+
[supervisorctl]
14+
username = 🍔
15+
password = 🍟
16+
17+
[rpcinterface:supervisor]
18+
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
19+
20+
[program:redis]
21+
command = redis-server
22+
directory = ../
23+
priority = 0
24+
startretries = 0
25+
stderr_logfile = /dev/stderr
26+
stderr_logfile_maxbytes = 0
27+
28+
[program:main]
29+
command = python manage.py runserver 8000
30+
directory = ../
31+
priority = 100
32+
stopasgroup = True
33+
stderr_logfile = /dev/stderr
34+
stderr_logfile_maxbytes = 0
35+
36+
[program:celery]
37+
command = celery worker -A readthedocsinc -Q default,celery,web,builder -l DEBUG -c 2
38+
directory = ../
39+
priority = 100
40+
stopasgroup = True
41+
stderr_logfile = /dev/stderr
42+
stderr_logfile_maxbytes = 0

docs/team.rst

+4-3
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Members
3333
~~~~~~~
3434

3535
* `Eric Holscher <https://github.com/ericholscher>`_ (Pacific Time)
36-
* `Anthony Johnson <https://github.com/agjohnson>`_ (Pacific Time)
36+
* `Anthony Johnson <https://github.com/agjohnson>`_ (Mountain Time)
3737
* `Manuel Kaufmann <https://github.com/humitos>`_ (Central Time)
3838
* Your Name Here
3939

@@ -63,7 +63,7 @@ Members
6363
~~~~~~~
6464

6565
* `Eric Holscher <https://github.com/ericholscher>`_ (Pacific Time)
66-
* `Anthony Johnson <https://github.com/agjohnson>`_ (Pacific Time)
66+
* `Anthony Johnson <https://github.com/agjohnson>`_ (Mountain Time)
6767
* `Matt Robenolt <https://github.com/mattrobenolt>`_ (Pacific Time)
6868
* Your Name Here
6969

@@ -108,9 +108,10 @@ Members
108108

109109
* `Eric Holscher <https://github.com/ericholscher>`_
110110
* `Anthony Johnson <https://github.com/agjohnson>`_
111+
* `Manuel Kaufmann <https://github.com/humitos>`_
111112
* `Gregor Müllegger <https://github.com/gregmuellegger>`_
112113
* `Stein Magnus Jodal <https://github.com/jodal>`_
113-
* Your Name Here
114+
* Your name here
114115

115116
Feel free to ask any of us if you have questions or want to join!
116117

media/css/readthedocs-doc-embed.css

+33-5
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,21 @@
88
}
99

1010
.rst-other-versions {
11-
text-align: left;
11+
text-align: left;
1212
}
1313

1414
.rst-other-versions a {
15-
border: 0;
15+
border: 0;
1616
}
1717

1818
.rst-other-versions dl {
19-
margin: 0;
19+
margin: 0;
2020
}
2121

2222

2323
/* Fix RTD theme bottom margin */
2424
.rst-content .line-block {
25-
margin-bottom: 24px
25+
margin-bottom: 24px
2626
}
2727

2828
/* Fix for nav bottom padding with flyout */
@@ -134,11 +134,39 @@ div.rtd-pro.alabaster div.rtd-pro-about a {
134134
border-bottom: 0px;
135135
}
136136

137-
div.rtd-pro.alabaster div.rtd-pro-about i.fa-info-circle:before {
137+
div.rtd-pro.alabaster div.rtd-pro-about i.fa-info-circle:before,
138+
div.rtd-pro.rtd-pro-footer div.rtd-pro-about i.fa-info-circle:before {
138139
content: "";
139140
color: #a3a3a3;
140141
}
141142

143+
/* Hide the "sponsored" note in the left navigation */
144+
div.rtd-pro-about span {
145+
display: none;
146+
}
147+
148+
/* Footer promos */
149+
div.rtd-pro.rtd-pro-footer div.rtd-pro-about span {
150+
display: inline;
151+
}
152+
div.rtd-pro.rtd-pro-footer div.rtd-pro-about {
153+
float: none;
154+
}
155+
div.rtd-pro.rtd-pro-footer div.rtd-pro-about a {
156+
text-decoration: none;
157+
}
158+
div.rtd-pro.rtd-pro-footer {
159+
text-align: left;
160+
}
161+
div.rtd-pro.rtd-pro-footer a.rtd-pro-image-wrapper {
162+
float: right;
163+
margin-left: 25px;
164+
}
165+
166+
div.rtd-pro-wrapper {
167+
clear: both;
168+
}
169+
142170
@media (max-width: 768px) {
143171
div.rst-pro.wy-menu {
144172
display: none;

readthedocs/core/static-src/core/js/doc-embed/constants.js

+5
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,9 @@ exports.PROMO_SUPPORTED_THEMES = [
1010
exports.THEME_ALABASTER
1111
]
1212

13+
exports.PROMO_TYPES = {
14+
LEFTNAV: 'doc', // Left navigation on documentation pages
15+
FOOTER: 'site-footer' // Footer of documentation pages
16+
};
17+
1318
module.exports = exports;

readthedocs/core/static-src/core/js/doc-embed/footer.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ function injectFooter(data) {
7373
data.promo_data.text,
7474
data.promo_data.link,
7575
data.promo_data.image,
76-
config.theme
76+
config.theme,
77+
data.promo_data.display_type
7778
)
7879
if (promo) {
7980
promo.display();

0 commit comments

Comments
 (0)