From: Mike Bayer Date: Sat, 2 Jul 2011 02:38:16 +0000 (-0400) Subject: - fix documentation versions in conf.py, other changes to site layout X-Git-Tag: rel_0_6_9~52 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9b67a2222153bb4e7dad8c4582c95ed8a47208a4;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - fix documentation versions in conf.py, other changes to site layout --- diff --git a/doc/build/builder/builders.py b/doc/build/builder/builders.py index d5feaf85ee..dfb74614a2 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 63ccd0d02b..f6d896f603 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 # " v 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 025e22f801..a5e3d17c84 100644 --- a/doc/build/templates/layout.mako +++ b/doc/build/templates/layout.mako @@ -49,7 +49,12 @@ Search:
- Version: ${release} Last Updated: ${last_updated} + Release: ${release} | Release Date: ${release_date} + % if not version.startswith(versions[0][0]): +
+ The current version of SQLAlchemy is ${versions[0][0]}. View current SQLAlchemy Documentation +
+ % endif
diff --git a/doc/build/templates/site_base.mako b/doc/build/templates/site_base.mako index 90aa9be615..de13d444d9 100644 --- a/doc/build/templates/site_base.mako +++ b/doc/build/templates/site_base.mako @@ -7,7 +7,7 @@
-Jump to Version: 0.7 | 0.6 | 0.5 +Jump to Version: ${" | ".join('%s' % (link, vers) for vers, link in versions)}