blob: 6de14ad0a1f114777741d11b712080c0f826054b [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 Pesavento14747002025-04-29 00:00:25 -040012project = 'ndn-cxx'
13copyright = '2013-2025, 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 Pesavento02bbfa72022-09-21 20:53:03 -040050exclude_patterns = ['Thumbs.db', '.DS_Store']
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -070051
Davide Pesavento14747002025-04-29 00:00:25 -040052# Disable syntax highlighting of code blocks by default.
53highlight_language = 'none'
54
55# Generate warnings for all missing references.
56nitpicky = True
57
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -070058
Davide Pesaventob310efb2019-04-11 22:10:24 -040059# -- Options for HTML output -------------------------------------------------
Davide Pesavento02bbfa72022-09-21 20:53:03 -040060# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -070061
Davide Pesavento14747002025-04-29 00:00:25 -040062html_theme = 'furo'
63html_logo = 'ndn-logo.svg'
64html_last_updated_fmt = ''
Davide Pesaventofa33f8d2020-09-19 18:48:42 -040065html_copy_source = False
66html_show_sourcelink = False
67
Davide Pesavento14747002025-04-29 00:00:25 -040068html_theme_options = {
69 'light_css_variables': {
70 'color-brand-primary': '#bc4010',
71 'color-brand-content': '#c85000',
72 'color-brand-visited': '#c85000',
73 },
74 'dark_css_variables': {
75 'color-brand-primary': '#fd861a',
76 'color-brand-content': '#f87e00',
77 'color-brand-visited': '#f87e00',
78 },
79 'source_repository': 'https://github.com/named-data/ndn-cxx',
80 'source_branch': 'master',
81}
82
83pygments_style = 'tango'
84pygments_dark_style = 'material'
Davide Pesavento933a5672020-07-03 22:32:43 -040085
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -070086
Davide Pesaventob310efb2019-04-11 22:10:24 -040087# -- Options for manual page output ------------------------------------------
Davide Pesavento02bbfa72022-09-21 20:53:03 -040088# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-manual-page-output
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -070089
90# One entry per manual page. List of tuples
91# (source start file, name, description, authors, manual section).
92man_pages = [
Davide Pesavento02bbfa72022-09-21 20:53:03 -040093 ('manpages/ndnsec', 'ndnsec', 'NDN security toolkit', [], 1),
94 ('manpages/ndnsec-cert-dump', 'ndnsec-cert-dump', 'export an NDN certificate', [], 1),
95 ('manpages/ndnsec-cert-gen', 'ndnsec-cert-gen', 'create an NDN certificate for an identity', [], 1),
96 ('manpages/ndnsec-cert-install', 'ndnsec-cert-install', 'import an NDN certificate from a file', [], 1),
97 ('manpages/ndnsec-delete', 'ndnsec-delete', 'delete an NDN identity, key, or certificate', [], 1),
98 ('manpages/ndnsec-export', 'ndnsec-export', 'export an NDN certificate and its private key to a file', [], 1),
99 ('manpages/ndnsec-get-default', 'ndnsec-get-default', 'show the default NDN identity, key, and certificate for the current user', [], 1),
100 ('manpages/ndnsec-import', 'ndnsec-import', 'import an NDN certificate and its private key from a file', [], 1),
101 ('manpages/ndnsec-key-gen', 'ndnsec-key-gen', 'generate an NDN key for an identity', [], 1),
102 ('manpages/ndnsec-list', 'ndnsec-list', 'list all known NDN identities, keys, and certificates', [], 1),
103 ('manpages/ndnsec-set-default', 'ndnsec-set-default', 'change the default NDN identity, key, or certificate for the current user', [], 1),
104 ('manpages/ndnsec-sign-req', 'ndnsec-sign-req', 'generate an NDN certificate signing request', [], 1),
105 ('manpages/ndnsec-unlock-tpm', 'ndnsec-unlock-tpm', 'unlock the TPM', [], 1),
106 ('manpages/ndn-client.conf', 'ndn-client.conf', 'configuration file for NDN applications', [], 5),
107 ('manpages/ndn-log', 'ndn-log', 'ndn-cxx logging', [], 7),
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -0700108]
109
Alexander Afanasyev9b0e1142014-05-08 00:17:34 -0700110
Davide Pesavento02bbfa72022-09-21 20:53:03 -0400111# -- Misc options ------------------------------------------------------------
Alexander Afanasyev9b0e1142014-05-08 00:17:34 -0700112
113doxylink = {
Davide Pesaventob310efb2019-04-11 22:10:24 -0400114 'ndn-cxx': ('ndn-cxx.tag', 'doxygen/'),
115}
116
117extlinks = {
Davide Pesavento02bbfa72022-09-21 20:53:03 -0400118 'issue': ('https://redmine.named-data.net/issues/%s', 'issue #%s'),
Alexander Afanasyev9b0e1142014-05-08 00:17:34 -0700119}