blob: 60dd74f68450f0b99c1419acc3eaff78c2f2a9ef [file] [log] [blame]
Alexander Afanasyev49272f72014-04-06 21:49:46 -07001# -*- coding: utf-8 -*-
2#
Davide Pesavento08b91c82019-04-13 19:42:10 -04003# Configuration file for the Sphinx documentation builder.
Alexander Afanasyev49272f72014-04-06 21:49:46 -07004#
Davide Pesavento08b91c82019-04-13 19:42:10 -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 Afanasyev49272f72014-04-06 21:49:46 -07008
Davide Pesavento08b91c82019-04-13 19:42:10 -04009# -- Path setup --------------------------------------------------------------
Alexander Afanasyev49272f72014-04-06 21:49:46 -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 Pesavento08b91c82019-04-13 19:42:10 -040014#
15import os
16import sys
17# sys.path.insert(0, os.path.abspath('.'))
Alexander Afanasyev49272f72014-04-06 21:49:46 -070018
Davide Pesavento0064c1d2018-03-03 18:43:53 -050019
Davide Pesavento08b91c82019-04-13 19:42:10 -040020# -- Project information -----------------------------------------------------
21
22project = u'Named Data Networking Forwarding Daemon (NFD)'
23copyright = u'Copyright © 2014-2019 Named Data Networking Project.'
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 Afanasyev49272f72014-04-06 21:49:46 -070040
41# If your documentation needs a minimal Sphinx version, state it here.
Davide Pesavento0064c1d2018-03-03 18:43:53 -050042#
Davide Pesavento08b91c82019-04-13 19:42:10 -040043needs_sphinx = '1.1'
Alexander Afanasyev49272f72014-04-06 21:49:46 -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 Pesavento08b91c82019-04-13 19:42:10 -040049 'sphinx.ext.extlinks',
Alexander Afanasyev49272f72014-04-06 21:49:46 -070050 'sphinx.ext.todo',
51]
52
Alexander Afanasyev20757882014-08-25 22:39:08 -070053def addExtensionIfExists(extension):
54 try:
55 __import__(extension)
56 extensions.append(extension)
57 except ImportError:
Davide Pesavento08b91c82019-04-13 19:42:10 -040058 sys.stderr.write("Extension '%s' not found. "
Alexander Afanasyev20757882014-08-25 22:39:08 -070059 "Some documentation may not build correctly.\n" % extension)
Alexander Afanasyev20757882014-08-25 22:39:08 -070060
Eric Newberry3406dc92018-03-25 14:28:50 -070061if sys.version_info[0] >= 3:
62 addExtensionIfExists('sphinxcontrib.doxylink')
Alexander Afanasyev20757882014-08-25 22:39:08 -070063
Davide Pesavento0064c1d2018-03-03 18:43:53 -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 Afanasyev20757882014-08-25 22:39:08 -070067
Alexander Afanasyev49272f72014-04-06 21:49:46 -070068# The master toctree document.
69master_doc = 'index'
70
Davide Pesavento08b91c82019-04-13 19:42:10 -040071# Add any paths that contain templates here, relative to this directory.
72templates_path = ['_templates']
Alexander Afanasyev49272f72014-04-06 21:49:46 -070073
74# List of patterns, relative to source directory, that match files and
75# directories to ignore when looking for source files.
Davide Pesavento08b91c82019-04-13 19:42:10 -040076# This pattern also affects html_static_path and html_extra_path.
Alexander Afanasyev49272f72014-04-06 21:49:46 -070077exclude_patterns = []
78
Alexander Afanasyev49272f72014-04-06 21:49:46 -070079
Davide Pesavento08b91c82019-04-13 19:42:10 -040080# -- Options for HTML output -------------------------------------------------
Alexander Afanasyev49272f72014-04-06 21:49:46 -070081
82# The theme to use for HTML and HTML Help pages. See the documentation for
83# a list of builtin themes.
Davide Pesavento0064c1d2018-03-03 18:43:53 -050084#
Alexander Afanasyev49272f72014-04-06 21:49:46 -070085html_theme = 'named_data_theme'
86
Alexander Afanasyev49272f72014-04-06 21:49:46 -070087# Add any paths that contain custom themes here, relative to this directory.
Davide Pesavento0064c1d2018-03-03 18:43:53 -050088html_theme_path = ['.']
Alexander Afanasyev49272f72014-04-06 21:49:46 -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 Afanasyev49272f72014-04-06 21:49:46 -070095
Davide Pesavento08b91c82019-04-13 19:42:10 -040096# -- Options for LaTeX output ------------------------------------------------
Alexander Afanasyev49272f72014-04-06 21:49:46 -070097
98latex_elements = {
Davide Pesavento0064c1d2018-03-03 18:43:53 -050099 # The paper size ('letterpaper' or 'a4paper').
100 #
101 # 'papersize': 'letterpaper',
Alexander Afanasyev49272f72014-04-06 21:49:46 -0700102
Davide Pesavento0064c1d2018-03-03 18:43:53 -0500103 # The font size ('10pt', '11pt' or '12pt').
104 #
105 # 'pointsize': '10pt',
Alexander Afanasyev49272f72014-04-06 21:49:46 -0700106
Davide Pesavento0064c1d2018-03-03 18:43:53 -0500107 # Additional stuff for the LaTeX preamble.
108 #
109 # 'preamble': '',
110
111 # Latex figure (float) alignment
112 #
113 # 'figure_align': 'htbp',
Alexander Afanasyev49272f72014-04-06 21:49:46 -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 Pesavento08b91c82019-04-13 19:42:10 -0400120 ('index', 'nfd-docs.tex', u'Named Data Networking Forwarding Daemon (NFD)',
121 author, 'manual'),
Alexander Afanasyev49272f72014-04-06 21:49:46 -0700122]
123
Alexander Afanasyev49272f72014-04-06 21:49:46 -0700124
Davide Pesavento08b91c82019-04-13 19:42:10 -0400125# -- Options for manual page output ------------------------------------------
Alexander Afanasyev49272f72014-04-06 21:49:46 -0700126
127# One entry per manual page. List of tuples
128# (source start file, name, description, authors, manual section).
129man_pages = [
Davide Pesavento08b91c82019-04-13 19:42:10 -0400130 ('manpages/nfd', 'nfd', 'the Named Data Networking Forwarding Daemon', [], 1),
131 ('manpages/nfdc', 'nfdc', 'interact with NFD management from the command line', [], 1),
132 ('manpages/nfdc-status', 'nfdc-status', 'show NFD status', [], 1),
133 ('manpages/nfdc-face', 'nfdc-face', 'show and manipulate NFD\'s faces', [], 1),
134 ('manpages/nfdc-route', 'nfdc-route', 'show and manipulate NFD\'s routes', [], 1),
135 ('manpages/nfdc-cs', 'nfdc-cs', 'show and manipulate NFD\'s Content Store', [], 1),
136 ('manpages/nfdc-strategy', 'nfdc-strategy', 'show and manipulate NFD\'s strategy choices', [], 1),
137 ('manpages/nfd-status', 'nfd-status', 'show a comprehensive report of NFD\'s status', [], 1),
138 ('manpages/nfd-status-http-server', 'nfd-status-http-server', 'NFD status HTTP server', [], 1),
139 ('manpages/ndn-autoconfig-server', 'ndn-autoconfig-server', 'auto-configuration server for NDN', [], 1),
140 ('manpages/ndn-autoconfig', 'ndn-autoconfig', 'auto-configuration client for NDN', [], 1),
141 ('manpages/ndn-autoconfig.conf', 'ndn-autoconfig.conf', 'configuration file for ndn-autoconfig', [], 5),
142 ('manpages/nfd-autoreg', 'nfd-autoreg', 'NFD automatic prefix registration daemon', [], 1),
143 ('manpages/nfd-asf-strategy', 'nfd-asf-strategy', 'NFD ASF strategy', [], 7),
Alexander Afanasyev49272f72014-04-06 21:49:46 -0700144]
145
Davide Pesavento08b91c82019-04-13 19:42:10 -0400146# If true, show URL addresses after external links.
147#man_show_urls = True
Alexander Afanasyev49272f72014-04-06 21:49:46 -0700148
Davide Pesavento0064c1d2018-03-03 18:43:53 -0500149
Davide Pesavento08b91c82019-04-13 19:42:10 -0400150# -- Custom options ----------------------------------------------------------
Alexander Afanasyev20757882014-08-25 22:39:08 -0700151
152doxylink = {
Davide Pesavento08b91c82019-04-13 19:42:10 -0400153 'nfd': ('NFD.tag', 'doxygen/'),
154}
155
156extlinks = {
157 'issue': ('https://redmine.named-data.net/issues/%s', 'issue #'),
Alexander Afanasyev20757882014-08-25 22:39:08 -0700158}
159
160if os.getenv('GOOGLE_ANALYTICS', None):
161 googleanalytics_id = os.environ['GOOGLE_ANALYTICS']
162 googleanalytics_enabled = True