Get the tricky parts of the sphinx conversion working.
This commit is contained in:
parent
11af37659a
commit
0b9e5ce9c8
|
@ -11,7 +11,12 @@ copyright = "2011, Facebook"
|
|||
|
||||
version = release = tornado.version
|
||||
|
||||
extensions = ["sphinx.ext.autodoc", "sphinx.ext.coverage", "sphinx.ext.viewcode"]
|
||||
extensions = [
|
||||
"sphinx.ext.autodoc",
|
||||
"sphinx.ext.coverage",
|
||||
"sphinx.ext.extlinks",
|
||||
"sphinx.ext.viewcode",
|
||||
]
|
||||
|
||||
primary_domain = 'py'
|
||||
default_role = 'py:obj'
|
||||
|
@ -79,3 +84,16 @@ html_theme_options = dict(
|
|||
latex_documents = [
|
||||
('index', 'tornado.tex', 'Tornado Documentation', 'Facebook', 'manual', False),
|
||||
]
|
||||
|
||||
# HACK: sphinx has limited support for substitutions with the |version|
|
||||
# variable, but there doesn't appear to be any way to use this in a link
|
||||
# target.
|
||||
# http://stackoverflow.com/questions/1227037/substitutions-inside-links-in-rest-sphinx
|
||||
# The extlink extension can be used to do link substitutions, but it requires a
|
||||
# portion of the url to be literally contained in the document. Therefore,
|
||||
# this link must be referenced as :current_tarball:`z`
|
||||
extlinks = {
|
||||
'current_tarball': (
|
||||
'https://github.com/downloads/facebook/tornado/tornado-%s.tar.g%%s' % version,
|
||||
'tornado-%s.tar.g' % version),
|
||||
}
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
Tornado Web Server
|
||||
==================
|
||||
.. title:: Tornado Web Server
|
||||
|
||||
.. image:: tornado.png
|
||||
|Tornado Web Server|
|
||||
====================
|
||||
|
||||
.. |Tornado Web Server| image:: tornado.png
|
||||
:alt: Tornado Web Server
|
||||
|
||||
`Tornado <http://www.tornadoweb.org/>`_ is an open source version of
|
||||
|
@ -38,11 +40,13 @@ Quick links
|
|||
-----------
|
||||
|
||||
* `Documentation <documentation.html>`_
|
||||
* `Download version |version| <https://github.com/downloads/facebook/tornado/tornado-|version|.tar.gz>`_ (`release notes </documentation/releases.html>`_)
|
||||
* |Download current version|: :current_tarball:`z` (`release notes </documentation/releases.html>`_)
|
||||
* `Source (github) <https://github.com/facebook/tornado>`_
|
||||
* `Mailing list <http://groups.google.com/group/python-tornado>`_
|
||||
* `Wiki <https://github.com/facebook/tornado/wiki/Links>`_
|
||||
|
||||
.. |Download current version| replace:: Download version |version|
|
||||
|
||||
Hello, world
|
||||
------------
|
||||
|
||||
|
@ -76,7 +80,9 @@ includes demo applications that are not present when Tornado is
|
|||
installed in this way, so you may wish to download a copy of the
|
||||
source tarball as well.
|
||||
|
||||
**Manual installation:** Download `tornado-|version|.tar.gz <https://github.com/downloads/facebook/tornado/tornado-{{version}}.tar.gz>`_::
|
||||
**Manual installation:** Download :current_tarball:`z`:
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
tar xvzf tornado-|version|.tar.gz
|
||||
cd tornado-|version|
|
||||
|
|
Loading…
Reference in New Issue