Skip to content

Commit

Permalink
Fix sphinx config in its new home, restore Makefile and custom css.
Browse files Browse the repository at this point in the history
  • Loading branch information
bdarnell committed Mar 10, 2013
1 parent 5872959 commit 4ea711a
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 4 deletions.
24 changes: 24 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
SPHINXOPTS=-W -d build/doctrees .

.PHONY: sphinx
sphinx:
sphinx-build -b html $(SPHINXOPTS) build/html

.PHONY: coverage
coverage:
sphinx-build -b coverage ${SPHINXOPTS} build/coverage
cat build/coverage/python.txt

.PHONY: latex
latex:
sphinx-build -b latex $(SPHINXOPTS) build/latex

# Building a pdf requires a latex installation. For macports, the needed
# packages are texlive-latex-extra and texlive-fonts-recommended.
# The output is in build/latex/tornado.pdf
.PHONY: pdf
pdf: latex
cd build/latex && pdflatex -interaction=nonstopmode tornado.tex

clean:
rm -rf build
6 changes: 3 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Ensure we get the local copy of tornado instead of what's on the standard path
import os
import sys
sys.path.insert(0, os.path.abspath("../.."))
sys.path.insert(0, os.path.abspath(".."))
import tornado

master_doc = "index"
Expand Down Expand Up @@ -57,9 +57,9 @@
"main",
]

html_static_path = [os.path.abspath("../static")]
html_static_path = ['tornado.css']
html_theme = 'default'
html_style = "sphinx.css"
html_style = "tornado.css"
highlight_language = "none"
html_theme_options = dict(
footerbgcolor="#fff",
Expand Down
2 changes: 1 addition & 1 deletion docs/releases/next.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Backwards-incompatible changes

* Python 2.5 is no longer supported. Python 3 is now supported in a single
codebase instead of using ``2to3``
* The `tornado.database` module has been removed. It is now available
* The ``tornado.database`` module has been removed. It is now available
as a separate package, `torndb <https://github.com/bdarnell/torndb>`_
* Functions that take an ``io_loop`` parameter now default to
`IOLoop.current()` instead of `IOLoop.instance()`.
Expand Down
67 changes: 67 additions & 0 deletions docs/tornado.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
@import url("default.css");

/* These style tweaks are probably going to turn out to be a little fragile.
They're currently based on the default theme from sphinx 1.0.7.
*/

div.body h1,
div.body h2,
div.body h3,
div.body h4,
div.body h5,
div.body h6,
div.sphinxsidebar h3,
div.sphinxsidebar h4 {
font-weight: bold;
border-bottom: none;
}

pre {
line-height: 14pt;
margin: 17pt;
padding-left: 1em;
border: none;
border-left: 1px solid #ccc;
}

div.body p, div.body dd, div.body li {
text-align: left;
}

.highlight {
background: #fff !important;
}

th.field-name {
background: #fff;
}

tt {
background: #fff;
}

/* "related" = top header */
div.related {
position: fixed;
}

/* body settings copied from div.sphinxsidebar so following a link to a
specific object positions that object below the fixed header */
div.body {
top: 30px;
bottom: 0;
right: 0;
left: 230px;
margin: 0;
position: fixed;
overflow: auto;
height: auto;
}

div.related, div.sphinxsidebar {
font-family: Calibri, sans-serif;
}

div.section {
max-width: 850px;
}

0 comments on commit 4ea711a

Please sign in to comment.