Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 1 | # Configuration file for the Sphinx documentation builder. |
Alexander Afanasyev | 7c6aeb0 | 2014-04-10 19:59:19 -0700 | [diff] [blame] | 2 | # |
Davide Pesavento | 02bbfa7 | 2022-09-21 20:53:03 -0400 | [diff] [blame] | 3 | # For the full list of built-in configuration values, see the documentation: |
Davide Pesavento | fa33f8d | 2020-09-19 18:48:42 -0400 | [diff] [blame] | 4 | # https://www.sphinx-doc.org/en/master/usage/configuration.html |
Alexander Afanasyev | 7c6aeb0 | 2014-04-10 19:59:19 -0700 | [diff] [blame] | 5 | |
Davide Pesavento | 02bbfa7 | 2022-09-21 20:53:03 -0400 | [diff] [blame] | 6 | import importlib.util |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 7 | import sys |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 8 | |
| 9 | # -- Project information ----------------------------------------------------- |
Davide Pesavento | 02bbfa7 | 2022-09-21 20:53:03 -0400 | [diff] [blame] | 10 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 11 | |
Davide Pesavento | 1474700 | 2025-04-29 00:00:25 -0400 | [diff] [blame] | 12 | project = 'ndn-cxx' |
| 13 | copyright = '2013-2025, Regents of the University of California' |
Davide Pesavento | 02bbfa7 | 2022-09-21 20:53:03 -0400 | [diff] [blame] | 14 | author = 'Named Data Networking Project' |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 15 | |
Davide Pesavento | 933a567 | 2020-07-03 22:32:43 -0400 | [diff] [blame] | 16 | # The short X.Y version. |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 17 | #version = '' |
| 18 | |
Davide Pesavento | 933a567 | 2020-07-03 22:32:43 -0400 | [diff] [blame] | 19 | # The full version, including alpha/beta/rc tags. |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -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 | 02bbfa7 | 2022-09-21 20:53:03 -0400 | [diff] [blame] | 30 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration |
Alexander Afanasyev | 7c6aeb0 | 2014-04-10 19:59:19 -0700 | [diff] [blame] | 31 | |
Davide Pesavento | 02bbfa7 | 2022-09-21 20:53:03 -0400 | [diff] [blame] | 32 | needs_sphinx = '4.0' |
Alexander Afanasyev | 7c6aeb0 | 2014-04-10 19:59:19 -0700 | [diff] [blame] | 33 | extensions = [ |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 34 | 'sphinx.ext.extlinks', |
Alexander Afanasyev | 7c6aeb0 | 2014-04-10 19:59:19 -0700 | [diff] [blame] | 35 | 'sphinx.ext.todo', |
| 36 | ] |
| 37 | |
Davide Pesavento | 05b56a8 | 2022-09-24 21:38:04 -0400 | [diff] [blame] | 38 | def addExtensionIfExists(extension: str): |
| 39 | try: |
| 40 | if importlib.util.find_spec(extension) is None: |
| 41 | raise ModuleNotFoundError(extension) |
| 42 | except (ImportError, ValueError): |
Davide Pesavento | 02bbfa7 | 2022-09-21 20:53:03 -0400 | [diff] [blame] | 43 | sys.stderr.write(f'WARNING: Extension {extension!r} not found. ' |
Davide Pesavento | 05b56a8 | 2022-09-24 21:38:04 -0400 | [diff] [blame] | 44 | 'Some documentation may not build correctly.\n') |
| 45 | else: |
| 46 | extensions.append(extension) |
Alexander Afanasyev | 9b0e114 | 2014-05-08 00:17:34 -0700 | [diff] [blame] | 47 | |
Davide Pesavento | d776a93 | 2020-03-20 18:42:36 -0400 | [diff] [blame] | 48 | addExtensionIfExists('sphinxcontrib.doxylink') |
Alexander Afanasyev | 9b0e114 | 2014-05-08 00:17:34 -0700 | [diff] [blame] | 49 | |
Davide Pesavento | 02bbfa7 | 2022-09-21 20:53:03 -0400 | [diff] [blame] | 50 | exclude_patterns = ['Thumbs.db', '.DS_Store'] |
Alexander Afanasyev | 7c6aeb0 | 2014-04-10 19:59:19 -0700 | [diff] [blame] | 51 | |
Davide Pesavento | 1474700 | 2025-04-29 00:00:25 -0400 | [diff] [blame] | 52 | # Disable syntax highlighting of code blocks by default. |
| 53 | highlight_language = 'none' |
| 54 | |
| 55 | # Generate warnings for all missing references. |
| 56 | nitpicky = True |
| 57 | |
Alexander Afanasyev | 7c6aeb0 | 2014-04-10 19:59:19 -0700 | [diff] [blame] | 58 | |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 59 | # -- Options for HTML output ------------------------------------------------- |
Davide Pesavento | 02bbfa7 | 2022-09-21 20:53:03 -0400 | [diff] [blame] | 60 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output |
Alexander Afanasyev | 7c6aeb0 | 2014-04-10 19:59:19 -0700 | [diff] [blame] | 61 | |
Davide Pesavento | 1474700 | 2025-04-29 00:00:25 -0400 | [diff] [blame] | 62 | html_theme = 'furo' |
| 63 | html_logo = 'ndn-logo.svg' |
| 64 | html_last_updated_fmt = '' |
Davide Pesavento | fa33f8d | 2020-09-19 18:48:42 -0400 | [diff] [blame] | 65 | html_copy_source = False |
| 66 | html_show_sourcelink = False |
| 67 | |
Davide Pesavento | 1474700 | 2025-04-29 00:00:25 -0400 | [diff] [blame] | 68 | html_theme_options = { |
| 69 | 'light_css_variables': { |
| 70 | 'color-brand-primary': '#bc4010', |
| 71 | 'color-brand-content': '#c85000', |
| 72 | 'color-brand-visited': '#c85000', |
| 73 | }, |
| 74 | 'dark_css_variables': { |
| 75 | 'color-brand-primary': '#fd861a', |
| 76 | 'color-brand-content': '#f87e00', |
| 77 | 'color-brand-visited': '#f87e00', |
| 78 | }, |
| 79 | 'source_repository': 'https://github.com/named-data/ndn-cxx', |
| 80 | 'source_branch': 'master', |
| 81 | } |
| 82 | |
| 83 | pygments_style = 'tango' |
| 84 | pygments_dark_style = 'material' |
Davide Pesavento | 933a567 | 2020-07-03 22:32:43 -0400 | [diff] [blame] | 85 | |
Alexander Afanasyev | 7c6aeb0 | 2014-04-10 19:59:19 -0700 | [diff] [blame] | 86 | |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 87 | # -- Options for manual page output ------------------------------------------ |
Davide Pesavento | 02bbfa7 | 2022-09-21 20:53:03 -0400 | [diff] [blame] | 88 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-manual-page-output |
Alexander Afanasyev | 7c6aeb0 | 2014-04-10 19:59:19 -0700 | [diff] [blame] | 89 | |
| 90 | # One entry per manual page. List of tuples |
| 91 | # (source start file, name, description, authors, manual section). |
| 92 | man_pages = [ |
Davide Pesavento | 02bbfa7 | 2022-09-21 20:53:03 -0400 | [diff] [blame] | 93 | ('manpages/ndnsec', 'ndnsec', 'NDN security toolkit', [], 1), |
| 94 | ('manpages/ndnsec-cert-dump', 'ndnsec-cert-dump', 'export an NDN certificate', [], 1), |
| 95 | ('manpages/ndnsec-cert-gen', 'ndnsec-cert-gen', 'create an NDN certificate for an identity', [], 1), |
| 96 | ('manpages/ndnsec-cert-install', 'ndnsec-cert-install', 'import an NDN certificate from a file', [], 1), |
| 97 | ('manpages/ndnsec-delete', 'ndnsec-delete', 'delete an NDN identity, key, or certificate', [], 1), |
| 98 | ('manpages/ndnsec-export', 'ndnsec-export', 'export an NDN certificate and its private key to a file', [], 1), |
| 99 | ('manpages/ndnsec-get-default', 'ndnsec-get-default', 'show the default NDN identity, key, and certificate for the current user', [], 1), |
| 100 | ('manpages/ndnsec-import', 'ndnsec-import', 'import an NDN certificate and its private key from a file', [], 1), |
| 101 | ('manpages/ndnsec-key-gen', 'ndnsec-key-gen', 'generate an NDN key for an identity', [], 1), |
| 102 | ('manpages/ndnsec-list', 'ndnsec-list', 'list all known NDN identities, keys, and certificates', [], 1), |
| 103 | ('manpages/ndnsec-set-default', 'ndnsec-set-default', 'change the default NDN identity, key, or certificate for the current user', [], 1), |
| 104 | ('manpages/ndnsec-sign-req', 'ndnsec-sign-req', 'generate an NDN certificate signing request', [], 1), |
| 105 | ('manpages/ndnsec-unlock-tpm', 'ndnsec-unlock-tpm', 'unlock the TPM', [], 1), |
| 106 | ('manpages/ndn-client.conf', 'ndn-client.conf', 'configuration file for NDN applications', [], 5), |
| 107 | ('manpages/ndn-log', 'ndn-log', 'ndn-cxx logging', [], 7), |
Alexander Afanasyev | 7c6aeb0 | 2014-04-10 19:59:19 -0700 | [diff] [blame] | 108 | ] |
| 109 | |
Alexander Afanasyev | 9b0e114 | 2014-05-08 00:17:34 -0700 | [diff] [blame] | 110 | |
Davide Pesavento | 02bbfa7 | 2022-09-21 20:53:03 -0400 | [diff] [blame] | 111 | # -- Misc options ------------------------------------------------------------ |
Alexander Afanasyev | 9b0e114 | 2014-05-08 00:17:34 -0700 | [diff] [blame] | 112 | |
| 113 | doxylink = { |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 114 | 'ndn-cxx': ('ndn-cxx.tag', 'doxygen/'), |
| 115 | } |
| 116 | |
| 117 | extlinks = { |
Davide Pesavento | 02bbfa7 | 2022-09-21 20:53:03 -0400 | [diff] [blame] | 118 | 'issue': ('https://redmine.named-data.net/issues/%s', 'issue #%s'), |
Alexander Afanasyev | 9b0e114 | 2014-05-08 00:17:34 -0700 | [diff] [blame] | 119 | } |