blob: 8ea637ac131ceb1e4ee63b9262051236b5a65f72 [file] [log] [blame]
Davide Pesaventob310efb2019-04-11 22:10:24 -04001# Configuration file for the Sphinx documentation builder.
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -07002#
Davide Pesavento02bbfa72022-09-21 20:53:03 -04003# For the full list of built-in configuration values, see the documentation:
Davide Pesaventofa33f8d2020-09-19 18:48:42 -04004# https://www.sphinx-doc.org/en/master/usage/configuration.html
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -07005
Davide Pesavento02bbfa72022-09-21 20:53:03 -04006import importlib.util
Davide Pesaventob310efb2019-04-11 22:10:24 -04007import sys
Davide Pesaventob310efb2019-04-11 22:10:24 -04008
9# -- Project information -----------------------------------------------------
Davide Pesavento02bbfa72022-09-21 20:53:03 -040010# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
Davide Pesaventob310efb2019-04-11 22:10:24 -040011
Davide Pesavento02bbfa72022-09-21 20:53:03 -040012project = 'ndn-cxx: NDN C++ library with eXperimental eXtensions'
Davide Pesavento16203ea2024-01-01 15:46:44 -050013copyright = 'Copyright © 2013-2024 Regents of the University of California.'
Davide Pesavento02bbfa72022-09-21 20:53:03 -040014author = 'Named Data Networking Project'
Davide Pesaventob310efb2019-04-11 22:10:24 -040015
Davide Pesavento933a5672020-07-03 22:32:43 -040016# The short X.Y version.
Davide Pesaventob310efb2019-04-11 22:10:24 -040017#version = ''
18
Davide Pesavento933a5672020-07-03 22:32:43 -040019# The full version, including alpha/beta/rc tags.
Davide Pesaventob310efb2019-04-11 22:10:24 -040020#release = ''
21
22# There are two options for replacing |today|: either, you set today to some
23# non-false value, then it is used:
24#today = ''
25# Else, today_fmt is used as the format for a strftime call.
26today_fmt = '%Y-%m-%d'
27
28
29# -- General configuration ---------------------------------------------------
Davide Pesavento02bbfa72022-09-21 20:53:03 -040030# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -070031
Davide Pesavento02bbfa72022-09-21 20:53:03 -040032needs_sphinx = '4.0'
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -070033extensions = [
Davide Pesaventob310efb2019-04-11 22:10:24 -040034 'sphinx.ext.extlinks',
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -070035 'sphinx.ext.todo',
36]
37
Davide Pesavento05b56a82022-09-24 21:38:04 -040038def addExtensionIfExists(extension: str):
39 try:
40 if importlib.util.find_spec(extension) is None:
41 raise ModuleNotFoundError(extension)
42 except (ImportError, ValueError):
Davide Pesavento02bbfa72022-09-21 20:53:03 -040043 sys.stderr.write(f'WARNING: Extension {extension!r} not found. '
Davide Pesavento05b56a82022-09-24 21:38:04 -040044 'Some documentation may not build correctly.\n')
45 else:
46 extensions.append(extension)
Alexander Afanasyev9b0e1142014-05-08 00:17:34 -070047
Davide Pesaventod776a932020-03-20 18:42:36 -040048addExtensionIfExists('sphinxcontrib.doxylink')
Alexander Afanasyev9b0e1142014-05-08 00:17:34 -070049
Davide Pesaventob310efb2019-04-11 22:10:24 -040050templates_path = ['_templates']
Davide Pesavento02bbfa72022-09-21 20:53:03 -040051exclude_patterns = ['Thumbs.db', '.DS_Store']
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -070052
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -070053
Davide Pesaventob310efb2019-04-11 22:10:24 -040054# -- Options for HTML output -------------------------------------------------
Davide Pesavento02bbfa72022-09-21 20:53:03 -040055# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -070056
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -070057html_theme = 'named_data_theme'
Davide Pesaventob310efb2019-04-11 22:10:24 -040058html_theme_path = ['.']
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -070059
60# Add any paths that contain custom static files (such as style sheets) here,
61# relative to this directory. They are copied after the builtin static files,
62# so a file named "default.css" will overwrite the builtin "default.css".
63html_static_path = ['_static']
64
Davide Pesaventofa33f8d2020-09-19 18:48:42 -040065html_copy_source = False
66html_show_sourcelink = False
67
Davide Pesavento933a5672020-07-03 22:32:43 -040068# Disable syntax highlighting of code blocks by default.
69highlight_language = 'none'
70
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -070071
Davide Pesaventob310efb2019-04-11 22:10:24 -040072# -- Options for manual page output ------------------------------------------
Davide Pesavento02bbfa72022-09-21 20:53:03 -040073# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-manual-page-output
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -070074
75# One entry per manual page. List of tuples
76# (source start file, name, description, authors, manual section).
77man_pages = [
Davide Pesavento02bbfa72022-09-21 20:53:03 -040078 ('manpages/ndnsec', 'ndnsec', 'NDN security toolkit', [], 1),
79 ('manpages/ndnsec-cert-dump', 'ndnsec-cert-dump', 'export an NDN certificate', [], 1),
80 ('manpages/ndnsec-cert-gen', 'ndnsec-cert-gen', 'create an NDN certificate for an identity', [], 1),
81 ('manpages/ndnsec-cert-install', 'ndnsec-cert-install', 'import an NDN certificate from a file', [], 1),
82 ('manpages/ndnsec-delete', 'ndnsec-delete', 'delete an NDN identity, key, or certificate', [], 1),
83 ('manpages/ndnsec-export', 'ndnsec-export', 'export an NDN certificate and its private key to a file', [], 1),
84 ('manpages/ndnsec-get-default', 'ndnsec-get-default', 'show the default NDN identity, key, and certificate for the current user', [], 1),
85 ('manpages/ndnsec-import', 'ndnsec-import', 'import an NDN certificate and its private key from a file', [], 1),
86 ('manpages/ndnsec-key-gen', 'ndnsec-key-gen', 'generate an NDN key for an identity', [], 1),
87 ('manpages/ndnsec-list', 'ndnsec-list', 'list all known NDN identities, keys, and certificates', [], 1),
88 ('manpages/ndnsec-set-default', 'ndnsec-set-default', 'change the default NDN identity, key, or certificate for the current user', [], 1),
89 ('manpages/ndnsec-sign-req', 'ndnsec-sign-req', 'generate an NDN certificate signing request', [], 1),
90 ('manpages/ndnsec-unlock-tpm', 'ndnsec-unlock-tpm', 'unlock the TPM', [], 1),
91 ('manpages/ndn-client.conf', 'ndn-client.conf', 'configuration file for NDN applications', [], 5),
92 ('manpages/ndn-log', 'ndn-log', 'ndn-cxx logging', [], 7),
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -070093]
94
Alexander Afanasyev9b0e1142014-05-08 00:17:34 -070095
Davide Pesavento02bbfa72022-09-21 20:53:03 -040096# -- Misc options ------------------------------------------------------------
Alexander Afanasyev9b0e1142014-05-08 00:17:34 -070097
98doxylink = {
Davide Pesaventob310efb2019-04-11 22:10:24 -040099 'ndn-cxx': ('ndn-cxx.tag', 'doxygen/'),
100}
101
102extlinks = {
Davide Pesavento02bbfa72022-09-21 20:53:03 -0400103 'issue': ('https://redmine.named-data.net/issues/%s', 'issue #%s'),
Alexander Afanasyev9b0e1142014-05-08 00:17:34 -0700104}