blob: 5f1dea9574d2952e65ed4610afb5cc7c5762d863 [file] [log] [blame]
Davide Pesaventofee7ee32020-04-15 02:45:07 -04001# Configuration file for the Sphinx documentation builder.
2#
Davide Pesavento872f18e2022-09-20 17:03:22 -04003# For the full list of built-in configuration values, see the documentation:
Davide Pesavento3d01fa32021-10-03 17:13:38 -04004# https://www.sphinx-doc.org/en/master/usage/configuration.html
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -07005
Davide Pesavento872f18e2022-09-20 17:03:22 -04006import importlib.util
Davide Pesaventofee7ee32020-04-15 02:45:07 -04007import sys
Davide Pesaventofee7ee32020-04-15 02:45:07 -04008
9# -- Project information -----------------------------------------------------
Davide Pesavento872f18e2022-09-20 17:03:22 -040010# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
Davide Pesaventofee7ee32020-04-15 02:45:07 -040011
Davide Pesavento872f18e2022-09-20 17:03:22 -040012project = 'NDNS: Domain Name Service for Named Data Networking'
13copyright = 'Copyright © 2014-2022 Named Data Networking Project.'
14author = 'Named Data Networking Project'
Davide Pesaventofee7ee32020-04-15 02:45:07 -040015
Davide Pesavento3d01fa32021-10-03 17:13:38 -040016# The short X.Y version.
Davide Pesaventofee7ee32020-04-15 02:45:07 -040017#version = ''
18
Davide Pesavento3d01fa32021-10-03 17:13:38 -040019# The full version, including alpha/beta/rc tags.
Davide Pesaventofee7ee32020-04-15 02:45:07 -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 Pesavento872f18e2022-09-20 17:03:22 -040030# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -070031
Davide Pesavento872f18e2022-09-20 17:03:22 -040032needs_sphinx = '4.0'
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -070033extensions = [
Davide Pesaventofee7ee32020-04-15 02:45:07 -040034 'sphinx.ext.extlinks',
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -070035 'sphinx.ext.todo',
36]
37
38def addExtensionIfExists(extension):
Davide Pesavento872f18e2022-09-20 17:03:22 -040039 if importlib.util.find_spec(extension) is not None:
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -070040 extensions.append(extension)
Davide Pesavento872f18e2022-09-20 17:03:22 -040041 else:
42 sys.stderr.write(f'WARNING: Extension {extension!r} not found. '
43 'Some documentation may not build correctly.\n')
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -070044
Davide Pesaventofee7ee32020-04-15 02:45:07 -040045addExtensionIfExists('sphinxcontrib.doxylink')
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -070046
Davide Pesaventofee7ee32020-04-15 02:45:07 -040047templates_path = ['_templates']
Davide Pesavento872f18e2022-09-20 17:03:22 -040048exclude_patterns = ['Thumbs.db', '.DS_Store']
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -070049
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -070050
Davide Pesaventofee7ee32020-04-15 02:45:07 -040051# -- Options for HTML output -------------------------------------------------
Davide Pesavento872f18e2022-09-20 17:03:22 -040052# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -070053
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -070054html_theme = 'named_data_theme'
Davide Pesaventofee7ee32020-04-15 02:45:07 -040055html_theme_path = ['.']
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -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 Pesavento3d01fa32021-10-03 17:13:38 -040062html_copy_source = False
63html_show_sourcelink = False
64
65# Disable syntax highlighting of code blocks by default.
66highlight_language = 'none'
67
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -070068
Davide Pesaventofee7ee32020-04-15 02:45:07 -040069# -- Options for manual page output ------------------------------------------
Davide Pesavento872f18e2022-09-20 17:03:22 -040070# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-manual-page-output
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -070071
72# One entry per manual page. List of tuples
73# (source start file, name, description, authors, manual section).
74man_pages = [
Davide Pesavento872f18e2022-09-20 17:03:22 -040075 ('manpages/ndns-daemon', 'ndns-daemon', 'Domain Name Service Daemon for Named Data Networking', None, 1),
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -070076]
77
Davide Pesaventofee7ee32020-04-15 02:45:07 -040078
Davide Pesavento872f18e2022-09-20 17:03:22 -040079# -- Misc options ------------------------------------------------------------
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -070080
81doxylink = {
Davide Pesaventofee7ee32020-04-15 02:45:07 -040082 'NDNS': ('NDNS.tag', 'doxygen/'),
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -070083}
84
Davide Pesaventofee7ee32020-04-15 02:45:07 -040085extlinks = {
Davide Pesavento872f18e2022-09-20 17:03:22 -040086 'issue': ('https://redmine.named-data.net/issues/%s', 'issue #%s'),
Davide Pesaventofee7ee32020-04-15 02:45:07 -040087}