From 4ea711af79a4a93d4cbd29ecd6a9ad4f55b82cba Mon Sep 17 00:00:00 2001 From: Ben Darnell Date: Sun, 10 Mar 2013 16:24:38 -0400 Subject: [PATCH] Fix sphinx config in its new home, restore Makefile and custom css. --- docs/Makefile | 24 +++++++++++++++ docs/conf.py | 6 ++-- docs/releases/next.rst | 2 +- docs/tornado.css | 67 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 95 insertions(+), 4 deletions(-) create mode 100644 docs/Makefile create mode 100644 docs/tornado.css diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 000000000..1b8b30deb --- /dev/null +++ b/docs/Makefile @@ -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 diff --git a/docs/conf.py b/docs/conf.py index 2266447f8..e0ca8d1e3 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -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" @@ -57,9 +57,9 @@ coverage_ignore_functions = [ "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", diff --git a/docs/releases/next.rst b/docs/releases/next.rst index 95b12a91d..89478dfd6 100644 --- a/docs/releases/next.rst +++ b/docs/releases/next.rst @@ -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 `_ * Functions that take an ``io_loop`` parameter now default to `IOLoop.current()` instead of `IOLoop.instance()`. diff --git a/docs/tornado.css b/docs/tornado.css new file mode 100644 index 000000000..de4d690b1 --- /dev/null +++ b/docs/tornado.css @@ -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; +} \ No newline at end of file -- 2.47.2