blob: 854d2a5b2a5d747fbda7f1b191a75afc383f11fa [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)'
13copyright = 'Copyright © 2014-2022 Named Data Networking Project.'
14author = '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
Alexander Afanasyev20757882014-08-25 22:39:08 -070038def addExtensionIfExists(extension):
Davide Pesavento6cc95412022-09-20 19:10:55 -040039 if importlib.util.find_spec(extension) is not None:
Alexander Afanasyev20757882014-08-25 22:39:08 -070040 extensions.append(extension)
Davide Pesavento6cc95412022-09-20 19:10:55 -040041 else:
42 sys.stderr.write(f'WARNING: Extension {extension!r} not found. '
43 'Some documentation may not build correctly.\n')
Alexander Afanasyev20757882014-08-25 22:39:08 -070044
Davide Pesavento69857c32020-04-05 16:36:26 -040045addExtensionIfExists('sphinxcontrib.doxylink')
Alexander Afanasyev20757882014-08-25 22:39:08 -070046
Davide Pesavento08b91c82019-04-13 19:42:10 -040047templates_path = ['_templates']
Davide Pesavento6cc95412022-09-20 19:10:55 -040048exclude_patterns = ['Thumbs.db', '.DS_Store']
Alexander Afanasyev49272f72014-04-06 21:49:46 -070049
Alexander Afanasyev49272f72014-04-06 21:49:46 -070050
Davide Pesavento08b91c82019-04-13 19:42:10 -040051# -- Options for HTML output -------------------------------------------------
Davide Pesavento6cc95412022-09-20 19:10:55 -040052# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
Alexander Afanasyev49272f72014-04-06 21:49:46 -070053
Alexander Afanasyev49272f72014-04-06 21:49:46 -070054html_theme = 'named_data_theme'
Davide Pesavento0064c1d2018-03-03 18:43:53 -050055html_theme_path = ['.']
Alexander Afanasyev49272f72014-04-06 21:49:46 -070056
57# Add any paths that contain custom static files (such as style sheets) here,
58# relative to this directory. They are copied after the builtin static files,
59# so a file named "default.css" will overwrite the builtin "default.css".
60html_static_path = ['_static']
61
Davide Pesaventoc0c08932020-10-07 00:26:25 -040062html_copy_source = False
63html_show_sourcelink = False
64
Davide Pesavento9f6a7d92020-10-06 15:21:48 -040065# Disable syntax highlighting of code blocks by default.
66highlight_language = 'none'
67
Alexander Afanasyev49272f72014-04-06 21:49:46 -070068
Davide Pesavento08b91c82019-04-13 19:42:10 -040069# -- Options for manual page output ------------------------------------------
Davide Pesavento6cc95412022-09-20 19:10:55 -040070# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-manual-page-output
Alexander Afanasyev49272f72014-04-06 21:49:46 -070071
72# One entry per manual page. List of tuples
73# (source start file, name, description, authors, manual section).
74man_pages = [
Davide Pesavento08b91c82019-04-13 19:42:10 -040075 ('manpages/nfd', 'nfd', 'the Named Data Networking Forwarding Daemon', [], 1),
76 ('manpages/nfdc', 'nfdc', 'interact with NFD management from the command line', [], 1),
77 ('manpages/nfdc-status', 'nfdc-status', 'show NFD status', [], 1),
78 ('manpages/nfdc-face', 'nfdc-face', 'show and manipulate NFD\'s faces', [], 1),
79 ('manpages/nfdc-route', 'nfdc-route', 'show and manipulate NFD\'s routes', [], 1),
80 ('manpages/nfdc-cs', 'nfdc-cs', 'show and manipulate NFD\'s Content Store', [], 1),
81 ('manpages/nfdc-strategy', 'nfdc-strategy', 'show and manipulate NFD\'s strategy choices', [], 1),
82 ('manpages/nfd-status', 'nfd-status', 'show a comprehensive report of NFD\'s status', [], 1),
83 ('manpages/nfd-status-http-server', 'nfd-status-http-server', 'NFD status HTTP server', [], 1),
84 ('manpages/ndn-autoconfig-server', 'ndn-autoconfig-server', 'auto-configuration server for NDN', [], 1),
85 ('manpages/ndn-autoconfig', 'ndn-autoconfig', 'auto-configuration client for NDN', [], 1),
86 ('manpages/ndn-autoconfig.conf', 'ndn-autoconfig.conf', 'configuration file for ndn-autoconfig', [], 5),
87 ('manpages/nfd-autoreg', 'nfd-autoreg', 'NFD automatic prefix registration daemon', [], 1),
88 ('manpages/nfd-asf-strategy', 'nfd-asf-strategy', 'NFD ASF strategy', [], 7),
Alexander Afanasyev49272f72014-04-06 21:49:46 -070089]
90
91
Davide Pesavento6cc95412022-09-20 19:10:55 -040092# -- Misc options ------------------------------------------------------------
Alexander Afanasyev20757882014-08-25 22:39:08 -070093
94doxylink = {
Davide Pesavento08b91c82019-04-13 19:42:10 -040095 'nfd': ('NFD.tag', 'doxygen/'),
96}
97
98extlinks = {
Davide Pesavento6cc95412022-09-20 19:10:55 -040099 'issue': ('https://redmine.named-data.net/issues/%s', 'issue #%s'),
Alexander Afanasyev20757882014-08-25 22:39:08 -0700100}