浏览代码

Help: Add context to titles in QtHelp.

This allows disambiguation of identifiers in Qt Assistant and Creator.
Stephen Kelly 11 年之前
父节点
当前提交
d107949d21
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      Utilities/Sphinx/templates/layout.html

+ 6 - 0
Utilities/Sphinx/templates/layout.html

@@ -11,3 +11,9 @@
     <a href="{{ pathto(master_doc) }}">{{ shorttitle|e }}</a>{{ reldelim1 }}
     <a href="{{ pathto(master_doc) }}">{{ shorttitle|e }}</a>{{ reldelim1 }}
   </li>
   </li>
 {% endblock %}
 {% endblock %}
+
+{# Put some context in the html title element. Workaround for #}
+{# https://bitbucket.org/birkenfeld/sphinx/issue/1492/qthelp-generate-html-title-element-should #}
+{% block htmltitle %}
+  <title>{{ title|striptags|e }} {{ "&mdash;"|safe }} {{ docstitle|e }}</title>
+{% endblock %}