浏览代码

Help: Configure html page navigation bars

Add a small CMake logo to the left side of the header and footer
navigation bars.  Set the html theme, title, and short title explicitly.
Brad King 12 年之前
父节点
当前提交
fb332197bf
共有 3 个文件被更改,包括 17 次插入0 次删除
  1. 4 0
      Utilities/Sphinx/conf.py.in
  2. 二进制
      Utilities/Sphinx/static/cmake-logo-16.png
  3. 13 0
      Utilities/Sphinx/templates/layout.html

+ 4 - 0
Utilities/Sphinx/conf.py.in

@@ -30,6 +30,7 @@ primary_domain = 'cmake'
 exclude_patterns = []
 exclude_patterns = []
 
 
 extensions = ['cmake']
 extensions = ['cmake']
+templates_path = ['@conf_path@/templates']
 
 
 cmake_manuals = sorted(glob.glob(r'@conf_docs@/manual/*.rst'))
 cmake_manuals = sorted(glob.glob(r'@conf_docs@/manual/*.rst'))
 cmake_manual_description = re.compile('^\.\. cmake-manual-description:(.*)$')
 cmake_manual_description = re.compile('^\.\. cmake-manual-description:(.*)$')
@@ -57,3 +58,6 @@ man_show_urls = False
 html_show_sourcelink = True
 html_show_sourcelink = True
 html_static_path = ['@conf_path@/static']
 html_static_path = ['@conf_path@/static']
 html_style = 'cmake.css'
 html_style = 'cmake.css'
+html_theme = 'default'
+html_title = 'CMake %s Documentation' % release
+html_short_title = '%s Documentation' % release

二进制
Utilities/Sphinx/static/cmake-logo-16.png


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

@@ -0,0 +1,13 @@
+{% extends "!layout.html" %}
+{% block rootrellink %}
+  <li>
+    <img src="{{ pathto('_static/cmake-logo-16.png', 1) }}" alt=""
+         style="vertical-align: middle; margin-top: -2px" />
+  </li>
+  <li>
+    <a href="http://www.cmake.org/">CMake</a>{{ reldelim1 }}
+  </li>
+  <li>
+    <a href="{{ pathto(master_doc) }}">{{ shorttitle|e }}</a>{{ reldelim1 }}
+  </li>
+{% endblock %}