blob: 36ecc04cd6be89b3cd346cd913ca728efa7f4399 [file] [log] [blame]
Davide Pesaventoa0546db2020-04-01 19:18:04 -04001# Configuration file for the Sphinx documentation builder.
Yingdi Yu06a678a2014-08-01 17:07:08 -07002#
Davide Pesavento55492d52022-09-19 18:38:02 -04003# For the full list of built-in configuration values, see the documentation:
Davide Pesavento22eeb292021-10-01 21:20:53 -04004# https://www.sphinx-doc.org/en/master/usage/configuration.html
Yingdi Yu06a678a2014-08-01 17:07:08 -07005
Davide Pesavento55492d52022-09-19 18:38:02 -04006import importlib.util
Davide Pesaventoa0546db2020-04-01 19:18:04 -04007import sys
Davide Pesaventoa0546db2020-04-01 19:18:04 -04008
9# -- Project information -----------------------------------------------------
Davide Pesavento55492d52022-09-19 18:38:02 -040010# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
Davide Pesaventoa0546db2020-04-01 19:18:04 -040011
Davide Pesavento55492d52022-09-19 18:38:02 -040012project = 'ChronoSync: A Synchronization Protocol for NDN'
13copyright = 'Copyright © 2012-2022 Regents of the University of California.'
14author = 'Named Data Networking Project'
Davide Pesaventoa0546db2020-04-01 19:18:04 -040015
Davide Pesavento22eeb292021-10-01 21:20:53 -040016# The short X.Y version.
Davide Pesaventoa0546db2020-04-01 19:18:04 -040017#version = ''
18
Davide Pesavento22eeb292021-10-01 21:20:53 -040019# The full version, including alpha/beta/rc tags.
Davide Pesaventoa0546db2020-04-01 19:18:04 -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 Pesavento55492d52022-09-19 18:38:02 -040030# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
Yingdi Yu06a678a2014-08-01 17:07:08 -070031
Davide Pesavento55492d52022-09-19 18:38:02 -040032needs_sphinx = '4.0'
Yingdi Yu06a678a2014-08-01 17:07:08 -070033extensions = [
Davide Pesavento22eeb292021-10-01 21:20:53 -040034 'sphinx.ext.extlinks',
Yingdi Yu06a678a2014-08-01 17:07:08 -070035 'sphinx.ext.todo',
36]
37
38def addExtensionIfExists(extension):
Davide Pesavento55492d52022-09-19 18:38:02 -040039 if importlib.util.find_spec(extension) is not None:
Yingdi Yu06a678a2014-08-01 17:07:08 -070040 extensions.append(extension)
Davide Pesavento55492d52022-09-19 18:38:02 -040041 else:
42 sys.stderr.write(f'WARNING: Extension {extension!r} not found. '
43 'Some documentation may not build correctly.\n')
Yingdi Yu06a678a2014-08-01 17:07:08 -070044
Davide Pesaventoa0546db2020-04-01 19:18:04 -040045addExtensionIfExists('sphinxcontrib.doxylink')
Yingdi Yu06a678a2014-08-01 17:07:08 -070046
Davide Pesaventoa0546db2020-04-01 19:18:04 -040047templates_path = ['_templates']
Davide Pesavento55492d52022-09-19 18:38:02 -040048exclude_patterns = ['Thumbs.db', '.DS_Store', 'RELEASE_NOTES.rst']
Yingdi Yu06a678a2014-08-01 17:07:08 -070049
50
Davide Pesaventoa0546db2020-04-01 19:18:04 -040051# -- Options for HTML output -------------------------------------------------
Davide Pesavento55492d52022-09-19 18:38:02 -040052# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
Yingdi Yu06a678a2014-08-01 17:07:08 -070053
Yingdi Yu06a678a2014-08-01 17:07:08 -070054html_theme = 'named_data_theme'
Davide Pesaventoa0546db2020-04-01 19:18:04 -040055html_theme_path = ['.']
Yingdi Yu06a678a2014-08-01 17:07:08 -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".
Davide Pesaventoa0546db2020-04-01 19:18:04 -040060html_static_path = ['_static']
Yingdi Yu06a678a2014-08-01 17:07:08 -070061
Davide Pesavento22eeb292021-10-01 21:20:53 -040062html_copy_source = False
63html_show_sourcelink = False
64
65# Disable syntax highlighting of code blocks by default.
66highlight_language = 'none'
67
Yingdi Yu06a678a2014-08-01 17:07:08 -070068
Davide Pesavento55492d52022-09-19 18:38:02 -040069# -- Misc options ------------------------------------------------------------
Yingdi Yu06a678a2014-08-01 17:07:08 -070070
71doxylink = {
Davide Pesaventoa0546db2020-04-01 19:18:04 -040072 'ChronoSync': ('ChronoSync.tag', 'doxygen/'),
Yingdi Yu06a678a2014-08-01 17:07:08 -070073}
Davide Pesavento22eeb292021-10-01 21:20:53 -040074
75extlinks = {
Davide Pesavento55492d52022-09-19 18:38:02 -040076 'issue': ('https://redmine.named-data.net/issues/%s', 'issue #%s'),
Davide Pesavento22eeb292021-10-01 21:20:53 -040077}