Davide Pesavento | 08b91c8 | 2019-04-13 19:42:10 -0400 | [diff] [blame] | 1 | # Configuration file for the Sphinx documentation builder. |
Alexander Afanasyev | 49272f7 | 2014-04-06 21:49:46 -0700 | [diff] [blame] | 2 | # |
Davide Pesavento | 6cc9541 | 2022-09-20 19:10:55 -0400 | [diff] [blame] | 3 | # For the full list of built-in configuration values, see the documentation: |
Davide Pesavento | 9f6a7d9 | 2020-10-06 15:21:48 -0400 | [diff] [blame] | 4 | # https://www.sphinx-doc.org/en/master/usage/configuration.html |
Alexander Afanasyev | 49272f7 | 2014-04-06 21:49:46 -0700 | [diff] [blame] | 5 | |
Davide Pesavento | 6cc9541 | 2022-09-20 19:10:55 -0400 | [diff] [blame] | 6 | import importlib.util |
Davide Pesavento | 08b91c8 | 2019-04-13 19:42:10 -0400 | [diff] [blame] | 7 | import sys |
Davide Pesavento | 0064c1d | 2018-03-03 18:43:53 -0500 | [diff] [blame] | 8 | |
Davide Pesavento | 08b91c8 | 2019-04-13 19:42:10 -0400 | [diff] [blame] | 9 | # -- Project information ----------------------------------------------------- |
Davide Pesavento | 6cc9541 | 2022-09-20 19:10:55 -0400 | [diff] [blame] | 10 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information |
Davide Pesavento | 08b91c8 | 2019-04-13 19:42:10 -0400 | [diff] [blame] | 11 | |
Davide Pesavento | 6cc9541 | 2022-09-20 19:10:55 -0400 | [diff] [blame] | 12 | project = 'Named Data Networking Forwarding Daemon (NFD)' |
Davide Pesavento | 4c95771 | 2024-01-01 15:40:06 -0500 | [diff] [blame^] | 13 | copyright = 'Copyright © 2014-2024 Named Data Networking Project.' |
Davide Pesavento | 6cc9541 | 2022-09-20 19:10:55 -0400 | [diff] [blame] | 14 | author = 'Named Data Networking Project' |
Davide Pesavento | 08b91c8 | 2019-04-13 19:42:10 -0400 | [diff] [blame] | 15 | |
Davide Pesavento | 9f6a7d9 | 2020-10-06 15:21:48 -0400 | [diff] [blame] | 16 | # The short X.Y version. |
Davide Pesavento | 08b91c8 | 2019-04-13 19:42:10 -0400 | [diff] [blame] | 17 | #version = '' |
| 18 | |
Davide Pesavento | 9f6a7d9 | 2020-10-06 15:21:48 -0400 | [diff] [blame] | 19 | # The full version, including alpha/beta/rc tags. |
Davide Pesavento | 08b91c8 | 2019-04-13 19:42:10 -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 | 6cc9541 | 2022-09-20 19:10:55 -0400 | [diff] [blame] | 30 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration |
Alexander Afanasyev | 49272f7 | 2014-04-06 21:49:46 -0700 | [diff] [blame] | 31 | |
Davide Pesavento | 6cc9541 | 2022-09-20 19:10:55 -0400 | [diff] [blame] | 32 | needs_sphinx = '4.0' |
Alexander Afanasyev | 49272f7 | 2014-04-06 21:49:46 -0700 | [diff] [blame] | 33 | extensions = [ |
Davide Pesavento | 08b91c8 | 2019-04-13 19:42:10 -0400 | [diff] [blame] | 34 | 'sphinx.ext.extlinks', |
Alexander Afanasyev | 49272f7 | 2014-04-06 21:49:46 -0700 | [diff] [blame] | 35 | 'sphinx.ext.todo', |
| 36 | ] |
| 37 | |
Davide Pesavento | 36184f6 | 2022-09-25 03:48:58 -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 | 6cc9541 | 2022-09-20 19:10:55 -0400 | [diff] [blame] | 43 | sys.stderr.write(f'WARNING: Extension {extension!r} not found. ' |
Davide Pesavento | 36184f6 | 2022-09-25 03:48:58 -0400 | [diff] [blame] | 44 | 'Some documentation may not build correctly.\n') |
| 45 | else: |
| 46 | extensions.append(extension) |
Alexander Afanasyev | 2075788 | 2014-08-25 22:39:08 -0700 | [diff] [blame] | 47 | |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 48 | addExtensionIfExists('sphinxcontrib.doxylink') |
Alexander Afanasyev | 2075788 | 2014-08-25 22:39:08 -0700 | [diff] [blame] | 49 | |
Davide Pesavento | 08b91c8 | 2019-04-13 19:42:10 -0400 | [diff] [blame] | 50 | templates_path = ['_templates'] |
Davide Pesavento | 6cc9541 | 2022-09-20 19:10:55 -0400 | [diff] [blame] | 51 | exclude_patterns = ['Thumbs.db', '.DS_Store'] |
Alexander Afanasyev | 49272f7 | 2014-04-06 21:49:46 -0700 | [diff] [blame] | 52 | |
Alexander Afanasyev | 49272f7 | 2014-04-06 21:49:46 -0700 | [diff] [blame] | 53 | |
Davide Pesavento | 08b91c8 | 2019-04-13 19:42:10 -0400 | [diff] [blame] | 54 | # -- Options for HTML output ------------------------------------------------- |
Davide Pesavento | 6cc9541 | 2022-09-20 19:10:55 -0400 | [diff] [blame] | 55 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output |
Alexander Afanasyev | 49272f7 | 2014-04-06 21:49:46 -0700 | [diff] [blame] | 56 | |
Alexander Afanasyev | 49272f7 | 2014-04-06 21:49:46 -0700 | [diff] [blame] | 57 | html_theme = 'named_data_theme' |
Davide Pesavento | 0064c1d | 2018-03-03 18:43:53 -0500 | [diff] [blame] | 58 | html_theme_path = ['.'] |
Alexander Afanasyev | 49272f7 | 2014-04-06 21:49:46 -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 | c0c0893 | 2020-10-07 00:26:25 -0400 | [diff] [blame] | 65 | html_copy_source = False |
| 66 | html_show_sourcelink = False |
| 67 | |
Davide Pesavento | 9f6a7d9 | 2020-10-06 15:21:48 -0400 | [diff] [blame] | 68 | # Disable syntax highlighting of code blocks by default. |
| 69 | highlight_language = 'none' |
| 70 | |
Alexander Afanasyev | 49272f7 | 2014-04-06 21:49:46 -0700 | [diff] [blame] | 71 | |
Davide Pesavento | 08b91c8 | 2019-04-13 19:42:10 -0400 | [diff] [blame] | 72 | # -- Options for manual page output ------------------------------------------ |
Davide Pesavento | 6cc9541 | 2022-09-20 19:10:55 -0400 | [diff] [blame] | 73 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-manual-page-output |
Alexander Afanasyev | 49272f7 | 2014-04-06 21:49:46 -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 | 08b91c8 | 2019-04-13 19:42:10 -0400 | [diff] [blame] | 78 | ('manpages/nfd', 'nfd', 'the Named Data Networking Forwarding Daemon', [], 1), |
| 79 | ('manpages/nfdc', 'nfdc', 'interact with NFD management from the command line', [], 1), |
| 80 | ('manpages/nfdc-status', 'nfdc-status', 'show NFD status', [], 1), |
| 81 | ('manpages/nfdc-face', 'nfdc-face', 'show and manipulate NFD\'s faces', [], 1), |
| 82 | ('manpages/nfdc-route', 'nfdc-route', 'show and manipulate NFD\'s routes', [], 1), |
| 83 | ('manpages/nfdc-cs', 'nfdc-cs', 'show and manipulate NFD\'s Content Store', [], 1), |
| 84 | ('manpages/nfdc-strategy', 'nfdc-strategy', 'show and manipulate NFD\'s strategy choices', [], 1), |
| 85 | ('manpages/nfd-status', 'nfd-status', 'show a comprehensive report of NFD\'s status', [], 1), |
| 86 | ('manpages/nfd-status-http-server', 'nfd-status-http-server', 'NFD status HTTP server', [], 1), |
| 87 | ('manpages/ndn-autoconfig-server', 'ndn-autoconfig-server', 'auto-configuration server for NDN', [], 1), |
| 88 | ('manpages/ndn-autoconfig', 'ndn-autoconfig', 'auto-configuration client for NDN', [], 1), |
| 89 | ('manpages/ndn-autoconfig.conf', 'ndn-autoconfig.conf', 'configuration file for ndn-autoconfig', [], 5), |
| 90 | ('manpages/nfd-autoreg', 'nfd-autoreg', 'NFD automatic prefix registration daemon', [], 1), |
| 91 | ('manpages/nfd-asf-strategy', 'nfd-asf-strategy', 'NFD ASF strategy', [], 7), |
Alexander Afanasyev | 49272f7 | 2014-04-06 21:49:46 -0700 | [diff] [blame] | 92 | ] |
| 93 | |
| 94 | |
Davide Pesavento | 6cc9541 | 2022-09-20 19:10:55 -0400 | [diff] [blame] | 95 | # -- Misc options ------------------------------------------------------------ |
Alexander Afanasyev | 2075788 | 2014-08-25 22:39:08 -0700 | [diff] [blame] | 96 | |
| 97 | doxylink = { |
Davide Pesavento | 08b91c8 | 2019-04-13 19:42:10 -0400 | [diff] [blame] | 98 | 'nfd': ('NFD.tag', 'doxygen/'), |
| 99 | } |
| 100 | |
| 101 | extlinks = { |
Davide Pesavento | 6cc9541 | 2022-09-20 19:10:55 -0400 | [diff] [blame] | 102 | 'issue': ('https://redmine.named-data.net/issues/%s', 'issue #%s'), |
Alexander Afanasyev | 2075788 | 2014-08-25 22:39:08 -0700 | [diff] [blame] | 103 | } |