summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2011-07-01 22:38:16 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2011-07-01 22:38:16 -0400
commit9b67a2222153bb4e7dad8c4582c95ed8a47208a4 (patch)
tree8c27f489d76a69a64053ad55ba3b992e1a18f764 /doc
parente1f6d074c4cc447689c7d23d399bc57779212a73 (diff)
downloadsqlalchemy-9b67a2222153bb4e7dad8c4582c95ed8a47208a4.tar.gz
- fix documentation versions in conf.py, other changes to site layout
Diffstat (limited to 'doc')
-rw-r--r--doc/build/builder/builders.py6
-rw-r--r--doc/build/conf.py10
-rw-r--r--doc/build/templates/layout.mako7
-rw-r--r--doc/build/templates/site_base.mako2
4 files changed, 19 insertions, 6 deletions
diff --git a/doc/build/builder/builders.py b/doc/build/builder/builders.py
index d5feaf85e..dfb74614a 100644
--- a/doc/build/builder/builders.py
+++ b/doc/build/builder/builders.py
@@ -14,7 +14,9 @@ from mako.template import Template
class MakoBridge(TemplateBridge):
def init(self, builder, *args, **kw):
self.layout = builder.config.html_context.get('mako_layout', 'html')
-
+ builder.config.html_context['release_date'] = builder.config['release_date']
+ builder.config.html_context['versions'] = builder.config['versions']
+
self.lookup = TemplateLookup(directories=builder.config.templates_path,
format_exceptions=True,
imports=[
@@ -162,6 +164,8 @@ def setup(app):
app.add_lexer('pycon+sql', PyConWithSQLLexer())
app.add_lexer('python+sql', PythonWithSQLLexer())
app.connect('autodoc-skip-member', autodoc_skip_member)
+ app.add_config_value('release_date', "", True)
+ app.add_config_value('versions', "", True)
PygmentsBridge.html_formatter = PopupSQLFormatter
PygmentsBridge.latex_formatter = PopupLatexFormatter
diff --git a/doc/build/conf.py b/doc/build/conf.py
index 63ccd0d02..f6d896f60 100644
--- a/doc/build/conf.py
+++ b/doc/build/conf.py
@@ -60,9 +60,13 @@ copyright = u'2007-2011, the SQLAlchemy authors and contributors'
# built documents.
#
# The short X.Y version.
-version = sqlalchemy.__version__
+version = "0.6"
# The full version, including alpha/beta/rc tags.
-release = sqlalchemy.__version__
+release = "0.6.8"
+
+release_date = "June 5, 2011"
+
+versions = [('0.7', '07'), ('0.6', '06'), ('0.5', '05')]
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@@ -120,7 +124,7 @@ html_style = 'default.css'
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
-html_title = "%s %s Documentation" % (project, release)
+html_title = "%s %s Documentation" % (project, version)
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
diff --git a/doc/build/templates/layout.mako b/doc/build/templates/layout.mako
index 025e22f80..a5e3d17c8 100644
--- a/doc/build/templates/layout.mako
+++ b/doc/build/templates/layout.mako
@@ -49,7 +49,12 @@ Search:
</div>
<div class="versionheader">
- Version: <span class="versionnum">${release}</span> Last Updated: ${last_updated}
+ Release: <span class="versionnum">${release}</span> | Release Date: ${release_date}
+ % if not version.startswith(versions[0][0]):
+ <div class="versionwarning">
+ The current version of SQLAlchemy is ${versions[0][0]}. <a href="/docs/">View current SQLAlchemy Documentation</a>
+ </div>
+ % endif
</div>
<div class="clearboth"></div>
diff --git a/doc/build/templates/site_base.mako b/doc/build/templates/site_base.mako
index 90aa9be61..de13d444d 100644
--- a/doc/build/templates/site_base.mako
+++ b/doc/build/templates/site_base.mako
@@ -7,7 +7,7 @@
</%text>
<div style="text-align:right">
-<b>Jump to Version:</b> <a href="/docs/07/">0.7</a> | <a href="/docs/06/">0.6</a> | <a href="/docs/05/">0.5</a>
+<b>Jump to Version:</b> ${" | ".join('<a href="/docs/%s/">%s</a>' % (link, vers) for vers, link in versions)}
</div>
<div style="text-align:right">