blob: 83b4c5275940bf0f567bada40ebd8dafdfa4388f [file] [log] [blame]
Davide Pesavento08b91c82019-04-13 19:42:10 -04001# Configuration file for the Sphinx documentation builder.
Alexander Afanasyev49272f72014-04-06 21:49:46 -07002#
Davide Pesavento6cc95412022-09-20 19:10:55 -04003# For the full list of built-in configuration values, see the documentation:
Davide Pesavento9f6a7d92020-10-06 15:21:48 -04004# https://www.sphinx-doc.org/en/master/usage/configuration.html
Alexander Afanasyev49272f72014-04-06 21:49:46 -07005
Davide Pesavento6cc95412022-09-20 19:10:55 -04006import importlib.util
Davide Pesavento08b91c82019-04-13 19:42:10 -04007import sys
Davide Pesavento0064c1d2018-03-03 18:43:53 -05008
Davide Pesavento08b91c82019-04-13 19:42:10 -04009# -- Project information -----------------------------------------------------
Davide Pesavento6cc95412022-09-20 19:10:55 -040010# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
Davide Pesavento08b91c82019-04-13 19:42:10 -040011
Davide Pesavento6cc95412022-09-20 19:10:55 -040012project = 'Named Data Networking Forwarding Daemon (NFD)'
Davide Pesavento4c957712024-01-01 15:40:06 -050013copyright = 'Copyright © 2014-2024 Named Data Networking Project.'
Davide Pesavento6cc95412022-09-20 19:10:55 -040014author = 'Named Data Networking Project'
Davide Pesavento08b91c82019-04-13 19:42:10 -040015
Davide Pesavento9f6a7d92020-10-06 15:21:48 -040016# The short X.Y version.
Davide Pesavento08b91c82019-04-13 19:42:10 -040017#version = ''
18
Davide Pesavento9f6a7d92020-10-06 15:21:48 -040019# The full version, including alpha/beta/rc tags.
Davide Pesavento08b91c82019-04-13 19:42:10 -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 Pesavento6cc95412022-09-20 19:10:55 -040030# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
Alexander Afanasyev49272f72014-04-06 21:49:46 -070031
Davide Pesavento6cc95412022-09-20 19:10:55 -040032needs_sphinx = '4.0'
Alexander Afanasyev49272f72014-04-06 21:49:46 -070033extensions = [
Davide Pesavento08b91c82019-04-13 19:42:10 -040034 'sphinx.ext.extlinks',
Alexander Afanasyev49272f72014-04-06 21:49:46 -070035 'sphinx.ext.todo',
36]
37
Davide Pesavento36184f62022-09-25 03:48:58 -040038def addExtensionIfExists(extension: str):
39 try:
40 if importlib.util.find_spec(extension) is None:
41 raise ModuleNotFoundError(extension)
42 except (ImportError, ValueError):
Davide Pesavento6cc95412022-09-20 19:10:55 -040043 sys.stderr.write(f'WARNING: Extension {extension!r} not found. '
Davide Pesavento36184f62022-09-25 03:48:58 -040044 'Some documentation may not build correctly.\n')
45 else:
46 extensions.append(extension)
Alexander Afanasyev20757882014-08-25 22:39:08 -070047
Davide Pesavento69857c32020-04-05 16:36:26 -040048addExtensionIfExists('sphinxcontrib.doxylink')
Alexander Afanasyev20757882014-08-25 22:39:08 -070049
Davide Pesavento08b91c82019-04-13 19:42:10 -040050templates_path = ['_templates']
Davide Pesavento6cc95412022-09-20 19:10:55 -040051exclude_patterns = ['Thumbs.db', '.DS_Store']
Alexander Afanasyev49272f72014-04-06 21:49:46 -070052
Alexander Afanasyev49272f72014-04-06 21:49:46 -070053
Davide Pesavento08b91c82019-04-13 19:42:10 -040054# -- Options for HTML output -------------------------------------------------
Davide Pesavento6cc95412022-09-20 19:10:55 -040055# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
Alexander Afanasyev49272f72014-04-06 21:49:46 -070056
Alexander Afanasyev49272f72014-04-06 21:49:46 -070057html_theme = 'named_data_theme'
Davide Pesavento0064c1d2018-03-03 18:43:53 -050058html_theme_path = ['.']
Alexander Afanasyev49272f72014-04-06 21:49:46 -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 Pesaventoc0c08932020-10-07 00:26:25 -040065html_copy_source = False
66html_show_sourcelink = False
67
Davide Pesavento9f6a7d92020-10-06 15:21:48 -040068# Disable syntax highlighting of code blocks by default.
69highlight_language = 'none'
70
Alexander Afanasyev49272f72014-04-06 21:49:46 -070071
Davide Pesavento08b91c82019-04-13 19:42:10 -040072# -- Options for manual page output ------------------------------------------
Davide Pesavento6cc95412022-09-20 19:10:55 -040073# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-manual-page-output
Alexander Afanasyev49272f72014-04-06 21:49:46 -070074
75# One entry per manual page. List of tuples
76# (source start file, name, description, authors, manual section).
77man_pages = [
Davide Pesavento08b91c82019-04-13 19:42:10 -040078 ('manpages/nfd', 'nfd', 'the Named Data Networking Forwarding Daemon', [], 1),
79 ('manpages/nfdc', 'nfdc', 'interact with NFD management from the command line', [], 1),
80 ('manpages/nfdc-status', 'nfdc-status', 'show NFD status', [], 1),
81 ('manpages/nfdc-face', 'nfdc-face', 'show and manipulate NFD\'s faces', [], 1),
82 ('manpages/nfdc-route', 'nfdc-route', 'show and manipulate NFD\'s routes', [], 1),
83 ('manpages/nfdc-cs', 'nfdc-cs', 'show and manipulate NFD\'s Content Store', [], 1),
84 ('manpages/nfdc-strategy', 'nfdc-strategy', 'show and manipulate NFD\'s strategy choices', [], 1),
85 ('manpages/nfd-status', 'nfd-status', 'show a comprehensive report of NFD\'s status', [], 1),
86 ('manpages/nfd-status-http-server', 'nfd-status-http-server', 'NFD status HTTP server', [], 1),
87 ('manpages/ndn-autoconfig-server', 'ndn-autoconfig-server', 'auto-configuration server for NDN', [], 1),
88 ('manpages/ndn-autoconfig', 'ndn-autoconfig', 'auto-configuration client for NDN', [], 1),
89 ('manpages/ndn-autoconfig.conf', 'ndn-autoconfig.conf', 'configuration file for ndn-autoconfig', [], 5),
90 ('manpages/nfd-autoreg', 'nfd-autoreg', 'NFD automatic prefix registration daemon', [], 1),
91 ('manpages/nfd-asf-strategy', 'nfd-asf-strategy', 'NFD ASF strategy', [], 7),
Alexander Afanasyev49272f72014-04-06 21:49:46 -070092]
93
94
Davide Pesavento6cc95412022-09-20 19:10:55 -040095# -- Misc options ------------------------------------------------------------
Alexander Afanasyev20757882014-08-25 22:39:08 -070096
97doxylink = {
Davide Pesavento08b91c82019-04-13 19:42:10 -040098 'nfd': ('NFD.tag', 'doxygen/'),
99}
100
101extlinks = {
Davide Pesavento6cc95412022-09-20 19:10:55 -0400102 'issue': ('https://redmine.named-data.net/issues/%s', 'issue #%s'),
Alexander Afanasyev20757882014-08-25 22:39:08 -0700103}