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 | 02bbfa7 | 2022-09-21 20:53:03 -0400 | [diff] [blame] | 12 | project = 'ndn-cxx: NDN C++ library with eXperimental eXtensions' |
| 13 | copyright = 'Copyright © 2013-2022 Regents of the University of California.' |
| 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 | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 50 | templates_path = ['_templates'] |
Davide Pesavento | 02bbfa7 | 2022-09-21 20:53:03 -0400 | [diff] [blame] | 51 | exclude_patterns = ['Thumbs.db', '.DS_Store'] |
Alexander Afanasyev | 7c6aeb0 | 2014-04-10 19:59:19 -0700 | [diff] [blame] | 52 | |
Alexander Afanasyev | 7c6aeb0 | 2014-04-10 19:59:19 -0700 | [diff] [blame] | 53 | |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 54 | # -- Options for HTML output ------------------------------------------------- |
Davide Pesavento | 02bbfa7 | 2022-09-21 20:53:03 -0400 | [diff] [blame] | 55 | # 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] | 56 | |
Alexander Afanasyev | 7c6aeb0 | 2014-04-10 19:59:19 -0700 | [diff] [blame] | 57 | html_theme = 'named_data_theme' |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 58 | html_theme_path = ['.'] |
Alexander Afanasyev | 7c6aeb0 | 2014-04-10 19:59:19 -0700 | [diff] [blame] | 59 | |
| 60 | # Add any paths that contain custom static files (such as style sheets) here, |
| 61 | # relative to this directory. They are copied after the builtin static files, |
| 62 | # so a file named "default.css" will overwrite the builtin "default.css". |
| 63 | html_static_path = ['_static'] |
| 64 | |
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 | 933a567 | 2020-07-03 22:32:43 -0400 | [diff] [blame] | 68 | # Disable syntax highlighting of code blocks by default. |
| 69 | highlight_language = 'none' |
| 70 | |
Alexander Afanasyev | 7c6aeb0 | 2014-04-10 19:59:19 -0700 | [diff] [blame] | 71 | |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 72 | # -- Options for manual page output ------------------------------------------ |
Davide Pesavento | 02bbfa7 | 2022-09-21 20:53:03 -0400 | [diff] [blame] | 73 | # 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] | 74 | |
| 75 | # One entry per manual page. List of tuples |
| 76 | # (source start file, name, description, authors, manual section). |
| 77 | man_pages = [ |
Davide Pesavento | 02bbfa7 | 2022-09-21 20:53:03 -0400 | [diff] [blame] | 78 | ('manpages/ndnsec', 'ndnsec', 'NDN security toolkit', [], 1), |
| 79 | ('manpages/ndnsec-cert-dump', 'ndnsec-cert-dump', 'export an NDN certificate', [], 1), |
| 80 | ('manpages/ndnsec-cert-gen', 'ndnsec-cert-gen', 'create an NDN certificate for an identity', [], 1), |
| 81 | ('manpages/ndnsec-cert-install', 'ndnsec-cert-install', 'import an NDN certificate from a file', [], 1), |
| 82 | ('manpages/ndnsec-delete', 'ndnsec-delete', 'delete an NDN identity, key, or certificate', [], 1), |
| 83 | ('manpages/ndnsec-export', 'ndnsec-export', 'export an NDN certificate and its private key to a file', [], 1), |
| 84 | ('manpages/ndnsec-get-default', 'ndnsec-get-default', 'show the default NDN identity, key, and certificate for the current user', [], 1), |
| 85 | ('manpages/ndnsec-import', 'ndnsec-import', 'import an NDN certificate and its private key from a file', [], 1), |
| 86 | ('manpages/ndnsec-key-gen', 'ndnsec-key-gen', 'generate an NDN key for an identity', [], 1), |
| 87 | ('manpages/ndnsec-list', 'ndnsec-list', 'list all known NDN identities, keys, and certificates', [], 1), |
| 88 | ('manpages/ndnsec-set-default', 'ndnsec-set-default', 'change the default NDN identity, key, or certificate for the current user', [], 1), |
| 89 | ('manpages/ndnsec-sign-req', 'ndnsec-sign-req', 'generate an NDN certificate signing request', [], 1), |
| 90 | ('manpages/ndnsec-unlock-tpm', 'ndnsec-unlock-tpm', 'unlock the TPM', [], 1), |
| 91 | ('manpages/ndn-client.conf', 'ndn-client.conf', 'configuration file for NDN applications', [], 5), |
| 92 | ('manpages/ndn-log', 'ndn-log', 'ndn-cxx logging', [], 7), |
Alexander Afanasyev | 7c6aeb0 | 2014-04-10 19:59:19 -0700 | [diff] [blame] | 93 | ] |
| 94 | |
Alexander Afanasyev | 9b0e114 | 2014-05-08 00:17:34 -0700 | [diff] [blame] | 95 | |
Davide Pesavento | 02bbfa7 | 2022-09-21 20:53:03 -0400 | [diff] [blame] | 96 | # -- Misc options ------------------------------------------------------------ |
Alexander Afanasyev | 9b0e114 | 2014-05-08 00:17:34 -0700 | [diff] [blame] | 97 | |
| 98 | doxylink = { |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 99 | 'ndn-cxx': ('ndn-cxx.tag', 'doxygen/'), |
| 100 | } |
| 101 | |
| 102 | extlinks = { |
Davide Pesavento | 02bbfa7 | 2022-09-21 20:53:03 -0400 | [diff] [blame] | 103 | 'issue': ('https://redmine.named-data.net/issues/%s', 'issue #%s'), |
Alexander Afanasyev | 9b0e114 | 2014-05-08 00:17:34 -0700 | [diff] [blame] | 104 | } |