]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- fix documentation versions in conf.py, other changes to site layout
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 2 Jul 2011 02:38:11 +0000 (22:38 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 2 Jul 2011 02:38:11 +0000 (22:38 -0400)
doc/build/builder/builders.py
doc/build/conf.py
doc/build/templates/layout.mako
doc/build/templates/site_base.mako

index 25e283e5d3d79d63ee5052daa0f37881307c2881..0efd190893ad1a23b06e808a31e9dbb1bc88e6d9 100644 (file)
@@ -19,6 +19,8 @@ if __version__ < "0.4.1":
 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, 
@@ -166,6 +168,8 @@ def autodoc_skip_member(app, what, name, obj, skip, options):
 def setup(app):
     app.add_lexer('pycon+sql', PyConWithSQLLexer())
     app.add_lexer('python+sql', PythonWithSQLLexer())
+    app.add_config_value('release_date', "", True)
+    app.add_config_value('versions', "", True)
     app.connect('autodoc-skip-member', autodoc_skip_member)
     PygmentsBridge.html_formatter = PopupSQLFormatter
     PygmentsBridge.latex_formatter = PopupLatexFormatter
index 63ccd0d02b535cf67022ca6eb4c98fbb0c815cdf..7982ff97ef80b636c73058363783b4eb96cf08fe 100644 (file)
@@ -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.7"
 # The full version, including alpha/beta/rc tags.
-release = sqlalchemy.__version__
+release = "0.7.1"
+
+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
index 025e22f8013603fa9fe3a066ce03b00857b523fb..a5e3d17c84835d609dfc522a2ce47311fbf4f8e3 100644 (file)
@@ -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>
 
index 90aa9be615144bdc5e039693396bb48efd7e905d..de13d444d92f9bc806c63ed58d533d43ae3d9cb0 100644 (file)
@@ -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">