Davide Pesavento | a0546db | 2020-04-01 19:18:04 -0400 | [diff] [blame] | 1 | # Configuration file for the Sphinx documentation builder. |
Yingdi Yu | 06a678a | 2014-08-01 17:07:08 -0700 | [diff] [blame] | 2 | # |
Davide Pesavento | 55492d5 | 2022-09-19 18:38:02 -0400 | [diff] [blame^] | 3 | # For the full list of built-in configuration values, see the documentation: |
Davide Pesavento | 22eeb29 | 2021-10-01 21:20:53 -0400 | [diff] [blame] | 4 | # https://www.sphinx-doc.org/en/master/usage/configuration.html |
Yingdi Yu | 06a678a | 2014-08-01 17:07:08 -0700 | [diff] [blame] | 5 | |
Davide Pesavento | 55492d5 | 2022-09-19 18:38:02 -0400 | [diff] [blame^] | 6 | import importlib.util |
Davide Pesavento | a0546db | 2020-04-01 19:18:04 -0400 | [diff] [blame] | 7 | import sys |
Davide Pesavento | a0546db | 2020-04-01 19:18:04 -0400 | [diff] [blame] | 8 | |
| 9 | # -- Project information ----------------------------------------------------- |
Davide Pesavento | 55492d5 | 2022-09-19 18:38:02 -0400 | [diff] [blame^] | 10 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information |
Davide Pesavento | a0546db | 2020-04-01 19:18:04 -0400 | [diff] [blame] | 11 | |
Davide Pesavento | 55492d5 | 2022-09-19 18:38:02 -0400 | [diff] [blame^] | 12 | project = 'ChronoSync: A Synchronization Protocol for NDN' |
| 13 | copyright = 'Copyright © 2012-2022 Regents of the University of California.' |
| 14 | author = 'Named Data Networking Project' |
Davide Pesavento | a0546db | 2020-04-01 19:18:04 -0400 | [diff] [blame] | 15 | |
Davide Pesavento | 22eeb29 | 2021-10-01 21:20:53 -0400 | [diff] [blame] | 16 | # The short X.Y version. |
Davide Pesavento | a0546db | 2020-04-01 19:18:04 -0400 | [diff] [blame] | 17 | #version = '' |
| 18 | |
Davide Pesavento | 22eeb29 | 2021-10-01 21:20:53 -0400 | [diff] [blame] | 19 | # The full version, including alpha/beta/rc tags. |
Davide Pesavento | a0546db | 2020-04-01 19:18:04 -0400 | [diff] [blame] | 20 | #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. |
| 26 | today_fmt = '%Y-%m-%d' |
| 27 | |
| 28 | |
| 29 | # -- General configuration --------------------------------------------------- |
Davide Pesavento | 55492d5 | 2022-09-19 18:38:02 -0400 | [diff] [blame^] | 30 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration |
Yingdi Yu | 06a678a | 2014-08-01 17:07:08 -0700 | [diff] [blame] | 31 | |
Davide Pesavento | 55492d5 | 2022-09-19 18:38:02 -0400 | [diff] [blame^] | 32 | needs_sphinx = '4.0' |
Yingdi Yu | 06a678a | 2014-08-01 17:07:08 -0700 | [diff] [blame] | 33 | extensions = [ |
Davide Pesavento | 22eeb29 | 2021-10-01 21:20:53 -0400 | [diff] [blame] | 34 | 'sphinx.ext.extlinks', |
Yingdi Yu | 06a678a | 2014-08-01 17:07:08 -0700 | [diff] [blame] | 35 | 'sphinx.ext.todo', |
| 36 | ] |
| 37 | |
| 38 | def addExtensionIfExists(extension): |
Davide Pesavento | 55492d5 | 2022-09-19 18:38:02 -0400 | [diff] [blame^] | 39 | if importlib.util.find_spec(extension) is not None: |
Yingdi Yu | 06a678a | 2014-08-01 17:07:08 -0700 | [diff] [blame] | 40 | extensions.append(extension) |
Davide Pesavento | 55492d5 | 2022-09-19 18:38:02 -0400 | [diff] [blame^] | 41 | else: |
| 42 | sys.stderr.write(f'WARNING: Extension {extension!r} not found. ' |
| 43 | 'Some documentation may not build correctly.\n') |
Yingdi Yu | 06a678a | 2014-08-01 17:07:08 -0700 | [diff] [blame] | 44 | |
Davide Pesavento | a0546db | 2020-04-01 19:18:04 -0400 | [diff] [blame] | 45 | addExtensionIfExists('sphinxcontrib.doxylink') |
Yingdi Yu | 06a678a | 2014-08-01 17:07:08 -0700 | [diff] [blame] | 46 | |
Davide Pesavento | a0546db | 2020-04-01 19:18:04 -0400 | [diff] [blame] | 47 | templates_path = ['_templates'] |
Davide Pesavento | 55492d5 | 2022-09-19 18:38:02 -0400 | [diff] [blame^] | 48 | exclude_patterns = ['Thumbs.db', '.DS_Store', 'RELEASE_NOTES.rst'] |
Yingdi Yu | 06a678a | 2014-08-01 17:07:08 -0700 | [diff] [blame] | 49 | |
| 50 | |
Davide Pesavento | a0546db | 2020-04-01 19:18:04 -0400 | [diff] [blame] | 51 | # -- Options for HTML output ------------------------------------------------- |
Davide Pesavento | 55492d5 | 2022-09-19 18:38:02 -0400 | [diff] [blame^] | 52 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output |
Yingdi Yu | 06a678a | 2014-08-01 17:07:08 -0700 | [diff] [blame] | 53 | |
Yingdi Yu | 06a678a | 2014-08-01 17:07:08 -0700 | [diff] [blame] | 54 | html_theme = 'named_data_theme' |
Davide Pesavento | a0546db | 2020-04-01 19:18:04 -0400 | [diff] [blame] | 55 | html_theme_path = ['.'] |
Yingdi Yu | 06a678a | 2014-08-01 17:07:08 -0700 | [diff] [blame] | 56 | |
| 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 Pesavento | a0546db | 2020-04-01 19:18:04 -0400 | [diff] [blame] | 60 | html_static_path = ['_static'] |
Yingdi Yu | 06a678a | 2014-08-01 17:07:08 -0700 | [diff] [blame] | 61 | |
Davide Pesavento | 22eeb29 | 2021-10-01 21:20:53 -0400 | [diff] [blame] | 62 | html_copy_source = False |
| 63 | html_show_sourcelink = False |
| 64 | |
| 65 | # Disable syntax highlighting of code blocks by default. |
| 66 | highlight_language = 'none' |
| 67 | |
Yingdi Yu | 06a678a | 2014-08-01 17:07:08 -0700 | [diff] [blame] | 68 | |
Davide Pesavento | 55492d5 | 2022-09-19 18:38:02 -0400 | [diff] [blame^] | 69 | # -- Misc options ------------------------------------------------------------ |
Yingdi Yu | 06a678a | 2014-08-01 17:07:08 -0700 | [diff] [blame] | 70 | |
| 71 | doxylink = { |
Davide Pesavento | a0546db | 2020-04-01 19:18:04 -0400 | [diff] [blame] | 72 | 'ChronoSync': ('ChronoSync.tag', 'doxygen/'), |
Yingdi Yu | 06a678a | 2014-08-01 17:07:08 -0700 | [diff] [blame] | 73 | } |
Davide Pesavento | 22eeb29 | 2021-10-01 21:20:53 -0400 | [diff] [blame] | 74 | |
| 75 | extlinks = { |
Davide Pesavento | 55492d5 | 2022-09-19 18:38:02 -0400 | [diff] [blame^] | 76 | 'issue': ('https://redmine.named-data.net/issues/%s', 'issue #%s'), |
Davide Pesavento | 22eeb29 | 2021-10-01 21:20:53 -0400 | [diff] [blame] | 77 | } |