From edc7cc967dbec540bdb333a00e62581e010882c3 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 4 Nov 2013 13:36:41 -0500 Subject: [PATCH 1/4] 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 35c62fb8a..ca1defc86 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 ea00b7855..d8daee489 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 From e1f819664b7d2c2a26342a2d277e95f194ed71d7 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 4 Nov 2013 14:14:29 -0500 Subject: [PATCH 2/4] 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 ca1defc86..3b0b335f7 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) From fb332197bfabe5eb3b8dbd83d3d5c0d9032d71ca Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 4 Nov 2013 14:17:43 -0500 Subject: [PATCH 3/4] 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 d8daee489..e8f5d8a1e 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 0000000000000000000000000000000000000000..2039c25b045c545c27a3b57072d7e6277148c3b9 GIT binary patch literal 761 zcmV|8vjx|Ce*GMxAO|ybNiWit2d{ZpHNkQ2Ea}^Sv5ry0zk;GD08Hh>!eqhuC6x-mEubnCh2o6Ce-k`>SZfXp zJkWwhac6!ivb4o$Y}*HEVBYXNKv!4I-LecZH5nVQ9gnJL5^Ib=|7==wCgD85#fv!r z`up#zQmWlQe#p*}>rs(SbO@0+6bhvQ?0Q!?b!rg+nT#qYCKjHVo-X4QJ?uaXY3O2I zD0F-_MNre`0#2TM13)@`Pc=<5Xt=QB1=i6$&N#$Y*$Z)ru>1wkoU9*HE*c61yD$k*13dh_NwhKBBt&zI%cSn#xMJE)NiJ9dqdO8I0b zZOq0-3|&VEVQ!Ac`v4sv90;HRynh=f8e6{q(`S9J*7=djxvSWbEM5le-vw4#;~1z& z!=TwT&8QH+pX72cUC%@Fb3TLjzXZpp!*`w3>jjh7uJEntDlefNnz715h!Qt0RY-QWQvDSBcCNAG#l6>vq7l9Jw^q)NH%re+KPSN*S zTn*AJ&0tg*`KQ+R7fL7*(^eeW@a*lb2kj->gA(A@hM5KmfCH2P1#lI*M-!|aiG4Wn r_|+z5Ms5WB*`MW6zy9vEM}zhsBVzM(VhfAh00000NkvXXu0mjfS_V@& literal 0 HcmV?d00001 diff --git a/Utilities/Sphinx/templates/layout.html b/Utilities/Sphinx/templates/layout.html new file mode 100644 index 000000000..635ace322 --- /dev/null +++ b/Utilities/Sphinx/templates/layout.html @@ -0,0 +1,13 @@ +{% extends "!layout.html" %} +{% block rootrellink %} +
  • + +
  • +
  • + CMake{{ reldelim1 }} +
  • +
  • + {{ shorttitle|e }}{{ reldelim1 }} +
  • +{% endblock %} From a023a26cada4005fd57e5da9d9c132650594c594 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 4 Nov 2013 15:33:20 -0500 Subject: [PATCH 4/4] 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 e8f5d8a1e..52f4a315c 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 0000000000000000000000000000000000000000..fce8f922fbfa035c1aca86b91d5ec60bb333cb1b GIT binary patch literal 1150 zcmb7?ZAep57{||i3t#5liyE724$+z>B+R+grc=q6)M2S0N!zR`mQ=8`#3csVe2pT} z4}xex3SnCxf*C~!5d_f(E3~X(E<~t=KK3E{_Z)Q~gV65fcb|Ko!|!>{x#ut@qFW+i z^whAHFvb!XV_Jezl-bNv*tq1;jBx^&CLB z<}uo4Fuc$%4s zb5x`3LK*IPAHw7DU})$L`uqJbnK-M+&3y%h;y8Evwp<=m^4M6+4-DXOax$(c6c}_k z;Pd$~Hg+F9J*&{`mtZg~AU%ByVPP@c-?z=@ue}`&4fy1A!mZWfx>}9)ni{y>bLi?? zK}Ns+>*BxA=*J-z7ZFm?Dii%(K&+)D3?gEJUxvkbS7+74n#!U zqTZ3*->G+?hO4Wk1&g#F))PbImhQH9z*owpQusPMaWvOOE}iGy_YTy!&Cg_-+RWYI zK=ME0fdra^I8w^}^nZI7X{eDn!>)-mgpSRH9wzkc%bpIxzltwW2yI_+) H-HiPOjvqGh literal 0 HcmV?d00001