summaryrefslogtreecommitdiff
path: root/sphinx/htmlhelp.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-05-23 13:40:56 +0000
committerGeorg Brandl <georg@python.org>2008-05-23 13:40:56 +0000
commitd6e74a18a6f108aa6c2f3ff3513e0c6a02a4f80a (patch)
treecec45a62631024f80dc879fabb92fbc6cca84eee /sphinx/htmlhelp.py
parent8920e61c2ba30f67a990098173452084f1e44e36 (diff)
downloadsphinx-git-d6e74a18a6f108aa6c2f3ff3513e0c6a02a4f80a.tar.gz
FIx determination of the title in HTML help output.
Diffstat (limited to 'sphinx/htmlhelp.py')
-rw-r--r--sphinx/htmlhelp.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/sphinx/htmlhelp.py b/sphinx/htmlhelp.py
index edd05d037..77d0ff0a0 100644
--- a/sphinx/htmlhelp.py
+++ b/sphinx/htmlhelp.py
@@ -128,8 +128,9 @@ def build_hhx(builder, outdir, outname):
builder.info('writing project file...')
f = open(path.join(outdir, outname+'.hhp'), 'w')
try:
- f.write(project_template % {'outname': outname,
- 'title': builder.config.html_title,
+ title = builder.config.html_title or \
+ '%s v%s documentation' % (builder.config.project, builder.config.release)
+ f.write(project_template % {'outname': outname, 'title': title,
'version': builder.config.version,
'project': builder.config.project})
if not outdir.endswith(os.sep):
@@ -160,7 +161,8 @@ def build_hhx(builder, outdir, outname):
for subnode in node:
write_toc(subnode, ullevel)
elif isinstance(node, nodes.reference):
- item = object_sitemap % (cgi.escape(node.astext()), node['refuri'])
+ link = node['refuri']
+ item = object_sitemap % (cgi.escape(node.astext()), link)
f.write(item.encode('ascii', 'xmlcharrefreplace'))
elif isinstance(node, nodes.bullet_list):
if ullevel != 0: