From edc7cc967dbec540bdb333a00e62581e010882c3 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 4 Nov 2013 13:36:41 -0500 Subject: Help: Configure copyright year automatically Teach our Sphinx conf.py to compute the copyright end year automatically. Drop our hard-coded configuration for it. --- Utilities/Sphinx/CMakeLists.txt | 1 - Utilities/Sphinx/conf.py.in | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Utilities/Sphinx/CMakeLists.txt b/Utilities/Sphinx/CMakeLists.txt index 35c62fb..ca1defc 100644 --- a/Utilities/Sphinx/CMakeLists.txt +++ b/Utilities/Sphinx/CMakeLists.txt @@ -38,7 +38,6 @@ endif() set(conf_docs "${CMake_SOURCE_DIR}/Help") set(conf_path "${CMAKE_CURRENT_SOURCE_DIR}") -set(conf_copyright "2000-2013 Kitware, Inc.") set(conf_version "${CMake_MAJOR_VERSION}.${CMake_MINOR_VERSION}.${CMake_PATCH_VERSION}") set(conf_release "${CMake_VERSION}") configure_file(conf.py.in conf.py @ONLY) diff --git a/Utilities/Sphinx/conf.py.in b/Utilities/Sphinx/conf.py.in index ea00b78..d8daee4 100644 --- a/Utilities/Sphinx/conf.py.in +++ b/Utilities/Sphinx/conf.py.in @@ -13,14 +13,15 @@ import sys import os import re import glob +import time sys.path.insert(0, r'@conf_path@') source_suffix = '.rst' master_doc = 'index' -project = 'CMake' -copyright = '@conf_copyright@' +project = 'CMake' +copyright = '2000-%s Kitware, Inc.' % time.strftime('%Y') version = '@conf_version@' # feature version release = '@conf_release@' # full version string -- cgit v0.12 From e1f819664b7d2c2a26342a2d277e95f194ed71d7 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 4 Nov 2013 14:14:29 -0500 Subject: Help: Configure |version| replacement correctly Fix our configuration of the Sphinx conf.py 'version' entry to refer to the correctly-spelled CMake_VERSION_(MAJOR|MINOR|PATCH) variables. --- Utilities/Sphinx/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Utilities/Sphinx/CMakeLists.txt b/Utilities/Sphinx/CMakeLists.txt index ca1defc..3b0b335 100644 --- a/Utilities/Sphinx/CMakeLists.txt +++ b/Utilities/Sphinx/CMakeLists.txt @@ -38,7 +38,7 @@ endif() set(conf_docs "${CMake_SOURCE_DIR}/Help") set(conf_path "${CMAKE_CURRENT_SOURCE_DIR}") -set(conf_version "${CMake_MAJOR_VERSION}.${CMake_MINOR_VERSION}.${CMake_PATCH_VERSION}") +set(conf_version "${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CMake_VERSION_PATCH}") set(conf_release "${CMake_VERSION}") configure_file(conf.py.in conf.py @ONLY) -- cgit v0.12 From fb332197bfabe5eb3b8dbd83d3d5c0d9032d71ca Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 4 Nov 2013 14:17:43 -0500 Subject: 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. --- Utilities/Sphinx/conf.py.in | 4 ++++ Utilities/Sphinx/static/cmake-logo-16.png | Bin 0 -> 761 bytes Utilities/Sphinx/templates/layout.html | 13 +++++++++++++ 3 files changed, 17 insertions(+) create mode 100644 Utilities/Sphinx/static/cmake-logo-16.png create mode 100644 Utilities/Sphinx/templates/layout.html diff --git a/Utilities/Sphinx/conf.py.in b/Utilities/Sphinx/conf.py.in index d8daee4..e8f5d8a 100644 --- a/Utilities/Sphinx/conf.py.in +++ b/Utilities/Sphinx/conf.py.in @@ -30,6 +30,7 @@ primary_domain = 'cmake' exclude_patterns = [] extensions = ['cmake'] +templates_path = ['@conf_path@/templates'] cmake_manuals = sorted(glob.glob(r'@conf_docs@/manual/*.rst')) cmake_manual_description = re.compile('^\.\. cmake-manual-description:(.*)$') @@ -57,3 +58,6 @@ man_show_urls = False html_show_sourcelink = True html_static_path = ['@conf_path@/static'] html_style = 'cmake.css' +html_theme = 'default' +html_title = 'CMake %s Documentation' % release +html_short_title = '%s Documentation' % release diff --git a/Utilities/Sphinx/static/cmake-logo-16.png b/Utilities/Sphinx/static/cmake-logo-16.png new file mode 100644 index 0000000..2039c25 Binary files /dev/null and b/Utilities/Sphinx/static/cmake-logo-16.png differ diff --git a/Utilities/Sphinx/templates/layout.html b/Utilities/Sphinx/templates/layout.html new file mode 100644 index 0000000..635ace3 --- /dev/null +++ b/Utilities/Sphinx/templates/layout.html @@ -0,0 +1,13 @@ +{% extends "!layout.html" %} +{% block rootrellink %} +
  • + +
  • +
  • + CMake{{ reldelim1 }} +
  • +
  • + {{ shorttitle|e }}{{ reldelim1 }} +
  • +{% endblock %} -- cgit v0.12 From a023a26cada4005fd57e5da9d9c132650594c594 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 4 Nov 2013 15:33:20 -0500 Subject: Help: Configure html favicon --- Utilities/Sphinx/conf.py.in | 1 + Utilities/Sphinx/static/cmake-favicon.ico | Bin 0 -> 1150 bytes 2 files changed, 1 insertion(+) create mode 100644 Utilities/Sphinx/static/cmake-favicon.ico diff --git a/Utilities/Sphinx/conf.py.in b/Utilities/Sphinx/conf.py.in index e8f5d8a..52f4a31 100644 --- a/Utilities/Sphinx/conf.py.in +++ b/Utilities/Sphinx/conf.py.in @@ -61,3 +61,4 @@ html_style = 'cmake.css' html_theme = 'default' html_title = 'CMake %s Documentation' % release html_short_title = '%s Documentation' % release +html_favicon = 'cmake-favicon.ico' diff --git a/Utilities/Sphinx/static/cmake-favicon.ico b/Utilities/Sphinx/static/cmake-favicon.ico new file mode 100644 index 0000000..fce8f92 Binary files /dev/null and b/Utilities/Sphinx/static/cmake-favicon.ico differ -- cgit v0.12