changeset 454:d7f316a2ca2f

wip, revamp the docs
author Louis Opter <kalessin@kalessin.fr>
date Sat, 14 May 2016 23:22:05 -0700
parents b20040b88de9
children 309dc021f81c
files docs_setup_alabaster_and_ga.patch series
diffstat 2 files changed, 104 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs_setup_alabaster_and_ga.patch	Sat May 14 23:22:05 2016 -0700
@@ -0,0 +1,103 @@
+# HG changeset patch
+# Parent  0997d02e7da2e52f7d1dba3783a6fee58fc730eb
+Setup the alabaster theme and Google Analytics for the docs
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -115,6 +115,9 @@
+ 
+ IF (SPHINX_FOUND)
+     MESSAGE(STATUS "Sphinx found, docs generation enabled")
++    IF (DEFINED LIGHTSD_GOOGLE_ANALYTICS_ID)
++      MESSAGE(STATUS "Using Google Analytics ID ${LIGHTSD_GOOGLE_ANALYTICS_ID} for the docs")
++    ENDIF ()
+     ADD_SUBDIRECTORY(docs)
+ ELSE ()
+     MESSAGE(STATUS "Shpinx wasn't found, docs generation disabled")
+diff --git a/docs/conf.py.in b/docs/conf.py.in
+--- a/docs/conf.py.in
++++ b/docs/conf.py.in
+@@ -13,7 +13,8 @@
+ # All configuration values have a default; values that are commented out
+ # serve to show the default.
+ 
+-import sys
++from __future__ import unicode_literals
++
+ import os
+ 
+ # If extensions (or modules to document with autodoc) are in another directory,
+@@ -34,7 +35,7 @@
+ extlinks = {'gh': ('https://github.com/lopter/lightsd/issues/%s', 'GH-')}
+ 
+ # Add any paths that contain templates here, relative to this directory.
+-templates_path = ['_templates']
++templates_path = [os.path.join('@CMAKE_CURRENT_SOURCE_DIR@', '_templates')]
+ 
+ # The suffix of source filenames.
+ source_suffix = '.rst'
+@@ -47,14 +48,14 @@
+ 
+ # General information about the project.
+ project = 'lightsd'
+-copyright = '2015, Louis Opter'
++copyright = '2015 - 2016, <a href="https://www.kalessin.fr/">Louis Opter</a>'
+ 
+ # The version info for the project you're documenting, acts as replacement for
+ # |version| and |release|, also used in various other places throughout the
+ # built documents.
+ #
+ # The short X.Y version.
+-version = '@LIGHTSD_VERSION@'
++version = '@CPACK_PACKAGE_VERSION_MAJOR@.@CPACK_PACKAGE_VERSION_MINOR@.@CPACK_PACKAGE_VERSION_PATCH@'
+ # The full version, including alpha/beta/rc tags.
+ release = '@LIGHTSD_VERSION@'
+ 
+@@ -101,12 +102,18 @@
+ 
+ # The theme to use for HTML and HTML Help pages.  See the documentation for
+ # a list of builtin themes.
+-html_theme = 'nature'
++html_theme = 'alabaster'
+ 
+ # Theme options are theme-specific and customize the look and feel of a theme
+ # further.  For a list of options available for each theme, see the
+ # documentation.
+-#html_theme_options = {}
++html_theme_options = {
++    "github_user": "lopter",
++    "github_repo": "lightsd",
++    "github_button": True,
++    "analytics_id": "@LIGHTSD_GOOGLE_ANALYTICS_ID@",
++    "show_powered_by": False,
++}
+ 
+ # Add any paths that contain custom themes here, relative to this directory.
+ #html_theme_path = []
+@@ -146,7 +153,15 @@
+ #html_use_smartypants = True
+ 
+ # Custom sidebar templates, maps document names to template names.
+-#html_sidebars = {}
++html_sidebars = {
++    '**': [
++        'about.html',
++        'navigation.html',
++        'relations.html',
++        'searchbox.html',
++        'donate.html',
++    ]
++}
+ 
+ # Additional templates that should be rendered to pages, maps page names to
+ # template names.
+@@ -162,7 +177,7 @@
+ #html_split_index = False
+ 
+ # If true, links to the reST sources are added to the pages.
+-#html_show_sourcelink = True
++html_show_sourcelink = False
+ 
+ # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
+ #html_show_sphinx = True
--- a/series	Sat May 14 18:07:00 2016 -0700
+++ b/series	Sat May 14 23:22:05 2016 -0700
@@ -1,5 +1,6 @@
 add_make_release.patch
 fix_freebsd_build.patch
+docs_setup_alabaster_and_ga.patch
 optional_jsonrpc_args.patch
 network_discovery.patch
 dont_use_ev_assign.patch