blob: 7e7368021aae512ca967c02b5d13e07b327c26f9 [file] [log] [blame]
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -07001# -*- coding: utf-8 -*-
2#
Davide Pesaventob310efb2019-04-11 22:10:24 -04003# Configuration file for the Sphinx documentation builder.
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -07004#
Davide Pesaventob310efb2019-04-11 22:10:24 -04005# This file only contains a selection of the most common options. For a full
6# list see the documentation:
7# http://www.sphinx-doc.org/en/master/config
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -07008
Davide Pesaventob310efb2019-04-11 22:10:24 -04009# -- Path setup --------------------------------------------------------------
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -070010
11# If extensions (or modules to document with autodoc) are in another directory,
12# add these directories to sys.path here. If the directory is relative to the
13# documentation root, use os.path.abspath to make it absolute, like shown here.
Davide Pesaventob310efb2019-04-11 22:10:24 -040014#
15import os
16import sys
17# sys.path.insert(0, os.path.abspath('.'))
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -070018
Davide Pesaventob310efb2019-04-11 22:10:24 -040019
20# -- Project information -----------------------------------------------------
21
22project = u'ndn-cxx: NDN C++ library with eXperimental eXtensions'
23copyright = u'Copyright © 2013-2019 Regents of the University of California.'
24author = u'Named Data Networking Project'
25
26# The short X.Y version
27#version = ''
28
29# The full version, including alpha/beta/rc tags
30#release = ''
31
32# There are two options for replacing |today|: either, you set today to some
33# non-false value, then it is used:
34#today = ''
35# Else, today_fmt is used as the format for a strftime call.
36today_fmt = '%Y-%m-%d'
37
38
39# -- General configuration ---------------------------------------------------
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -070040
41# If your documentation needs a minimal Sphinx version, state it here.
Davide Pesaventob310efb2019-04-11 22:10:24 -040042#
43needs_sphinx = '1.1'
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -070044
45# Add any Sphinx extension module names here, as strings. They can be
46# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
47# ones.
48extensions = [
Davide Pesaventob310efb2019-04-11 22:10:24 -040049 'sphinx.ext.extlinks',
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -070050 'sphinx.ext.todo',
51]
52
Alexander Afanasyev9b0e1142014-05-08 00:17:34 -070053def addExtensionIfExists(extension):
54 try:
55 __import__(extension)
56 extensions.append(extension)
Alexander Afanasyevfff47d62014-05-11 19:24:46 -070057 except ImportError:
Davide Pesaventob310efb2019-04-11 22:10:24 -040058 sys.stderr.write("Extension '%s' not found. "
Alexander Afanasyev9b0e1142014-05-08 00:17:34 -070059 "Some documentation may not build correctly.\n" % extension)
Alexander Afanasyev9b0e1142014-05-08 00:17:34 -070060
Eric Newberryc6500a92018-03-25 14:21:07 -070061if sys.version_info[0] >= 3:
62 addExtensionIfExists('sphinxcontrib.doxylink')
Alexander Afanasyev9b0e1142014-05-08 00:17:34 -070063
Alexander Afanasyev5560fd42018-03-07 17:03:03 -050064# sphinxcontrib.googleanalytics is currently not working with the latest version of Sphinx
65# if os.getenv('GOOGLE_ANALYTICS', None):
66# addExtensionIfExists('sphinxcontrib.googleanalytics')
Alexander Afanasyev9b0e1142014-05-08 00:17:34 -070067
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -070068# The master toctree document.
69master_doc = 'index'
70
Davide Pesaventob310efb2019-04-11 22:10:24 -040071# Add any paths that contain templates here, relative to this directory.
72templates_path = ['_templates']
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -070073
74# List of patterns, relative to source directory, that match files and
75# directories to ignore when looking for source files.
Davide Pesaventob310efb2019-04-11 22:10:24 -040076# This pattern also affects html_static_path and html_extra_path.
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -070077exclude_patterns = []
78
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -070079
Davide Pesaventob310efb2019-04-11 22:10:24 -040080# -- Options for HTML output -------------------------------------------------
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -070081
82# The theme to use for HTML and HTML Help pages. See the documentation for
83# a list of builtin themes.
Davide Pesaventob310efb2019-04-11 22:10:24 -040084#
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -070085html_theme = 'named_data_theme'
86
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -070087# Add any paths that contain custom themes here, relative to this directory.
Davide Pesaventob310efb2019-04-11 22:10:24 -040088html_theme_path = ['.']
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -070089
90# Add any paths that contain custom static files (such as style sheets) here,
91# relative to this directory. They are copied after the builtin static files,
92# so a file named "default.css" will overwrite the builtin "default.css".
93html_static_path = ['_static']
94
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -070095
Davide Pesaventob310efb2019-04-11 22:10:24 -040096# -- Options for LaTeX output ------------------------------------------------
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -070097
98latex_elements = {
Davide Pesaventob310efb2019-04-11 22:10:24 -040099 # The paper size ('letterpaper' or 'a4paper').
100 #
101 # 'papersize': 'letterpaper',
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -0700102
Davide Pesaventob310efb2019-04-11 22:10:24 -0400103 # The font size ('10pt', '11pt' or '12pt').
104 #
105 # 'pointsize': '10pt',
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -0700106
Davide Pesaventob310efb2019-04-11 22:10:24 -0400107 # Additional stuff for the LaTeX preamble.
108 #
109 # 'preamble': '',
110
111 # Latex figure (float) alignment
112 #
113 # 'figure_align': 'htbp',
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -0700114}
115
116# Grouping the document tree into LaTeX files. List of tuples
117# (source start file, target name, title,
118# author, documentclass [howto, manual, or own class]).
119latex_documents = [
Davide Pesaventob310efb2019-04-11 22:10:24 -0400120 ('index', 'ndn-cxx-docs.tex', u'NDN C++ library with eXperimental eXtensions',
121 author, 'manual'),
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -0700122]
123
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -0700124
Davide Pesaventob310efb2019-04-11 22:10:24 -0400125# -- Options for manual page output ------------------------------------------
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -0700126
127# One entry per manual page. List of tuples
128# (source start file, name, description, authors, manual section).
129man_pages = [
Davide Pesaventob310efb2019-04-11 22:10:24 -0400130 ('manpages/ndnsec', 'ndnsec', 'NDN security toolkit', None, 1),
131 ('manpages/ndnsec-cert-dump', 'ndnsec-cert-dump', 'export an NDN certificate', None, 1),
132 ('manpages/ndnsec-cert-gen', 'ndnsec-cert-gen', 'create an NDN certificate for an identity', None, 1),
133 ('manpages/ndnsec-cert-install', 'ndnsec-cert-install', 'import an NDN certificate from a file', None, 1),
134 ('manpages/ndnsec-delete', 'ndnsec-delete', 'delete an NDN identity, key, or certificate', None, 1),
135 ('manpages/ndnsec-export', 'ndnsec-export', 'export an NDN certificate and its private key to a file', None, 1),
136 ('manpages/ndnsec-get-default', 'ndnsec-get-default', 'show the default NDN identity, key, and certificate for the current user', None, 1),
137 ('manpages/ndnsec-import', 'ndnsec-import', 'import an NDN certificate and its private key from a file', None, 1),
138 ('manpages/ndnsec-key-gen', 'ndnsec-key-gen', 'generate an NDN key for an identity', None, 1),
139 ('manpages/ndnsec-list', 'ndnsec-list', 'list all known NDN identities, keys, and certificates', None, 1),
140 ('manpages/ndnsec-set-default', 'ndnsec-set-default', 'change the default NDN identity, key, or certificate for the current user', None, 1),
141 ('manpages/ndnsec-sign-req', 'ndnsec-sign-req', 'generate an NDN certificate signing request', None, 1),
142 ('manpages/ndnsec-unlock-tpm', 'ndnsec-unlock-tpm', 'unlock the TPM', None, 1),
143 ('manpages/ndn-client.conf', 'ndn-client.conf', 'configuration file for NDN platform', None, 5),
144 ('manpages/ndn-log', 'ndn-log', 'ndn-cxx logging', None, 7),
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -0700145]
146
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -0700147# If true, show URL addresses after external links.
Davide Pesaventob310efb2019-04-11 22:10:24 -0400148#man_show_urls = True
Alexander Afanasyev9b0e1142014-05-08 00:17:34 -0700149
150
Davide Pesaventob310efb2019-04-11 22:10:24 -0400151# -- Custom options ----------------------------------------------------------
Alexander Afanasyev9b0e1142014-05-08 00:17:34 -0700152
153doxylink = {
Davide Pesaventob310efb2019-04-11 22:10:24 -0400154 'ndn-cxx': ('ndn-cxx.tag', 'doxygen/'),
155}
156
157extlinks = {
158 'issue': ('https://redmine.named-data.net/issues/%s', 'issue #'),
Alexander Afanasyev9b0e1142014-05-08 00:17:34 -0700159}
160
161if os.getenv('GOOGLE_ANALYTICS', None):
162 googleanalytics_id = os.environ['GOOGLE_ANALYTICS']
163 googleanalytics_enabled = True