Davide Pesavento | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame] | 1 | # Configuration file for the Sphinx documentation builder. |
| 2 | # |
Davide Pesavento | 872f18e | 2022-09-20 17:03:22 -0400 | [diff] [blame] | 3 | # For the full list of built-in configuration values, see the documentation: |
Davide Pesavento | 3d01fa3 | 2021-10-03 17:13:38 -0400 | [diff] [blame] | 4 | # https://www.sphinx-doc.org/en/master/usage/configuration.html |
Alexander Afanasyev | bd5b67a | 2014-09-02 16:06:21 -0700 | [diff] [blame] | 5 | |
Davide Pesavento | 872f18e | 2022-09-20 17:03:22 -0400 | [diff] [blame] | 6 | import importlib.util |
Davide Pesavento | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame] | 7 | import sys |
Davide Pesavento | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame] | 8 | |
| 9 | # -- Project information ----------------------------------------------------- |
Davide Pesavento | 872f18e | 2022-09-20 17:03:22 -0400 | [diff] [blame] | 10 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information |
Davide Pesavento | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame] | 11 | |
Davide Pesavento | 872f18e | 2022-09-20 17:03:22 -0400 | [diff] [blame] | 12 | project = 'NDNS: Domain Name Service for Named Data Networking' |
Davide Pesavento | dadbc3e | 2023-02-14 02:32:36 -0500 | [diff] [blame^] | 13 | copyright = 'Copyright © 2014-2023 Named Data Networking Project.' |
Davide Pesavento | 872f18e | 2022-09-20 17:03:22 -0400 | [diff] [blame] | 14 | author = 'Named Data Networking Project' |
Davide Pesavento | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame] | 15 | |
Davide Pesavento | 3d01fa3 | 2021-10-03 17:13:38 -0400 | [diff] [blame] | 16 | # The short X.Y version. |
Davide Pesavento | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame] | 17 | #version = '' |
| 18 | |
Davide Pesavento | 3d01fa3 | 2021-10-03 17:13:38 -0400 | [diff] [blame] | 19 | # The full version, including alpha/beta/rc tags. |
Davide Pesavento | fee7ee3 | 2020-04-15 02:45:07 -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 | 872f18e | 2022-09-20 17:03:22 -0400 | [diff] [blame] | 30 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration |
Alexander Afanasyev | bd5b67a | 2014-09-02 16:06:21 -0700 | [diff] [blame] | 31 | |
Davide Pesavento | 872f18e | 2022-09-20 17:03:22 -0400 | [diff] [blame] | 32 | needs_sphinx = '4.0' |
Alexander Afanasyev | bd5b67a | 2014-09-02 16:06:21 -0700 | [diff] [blame] | 33 | extensions = [ |
Davide Pesavento | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame] | 34 | 'sphinx.ext.extlinks', |
Alexander Afanasyev | bd5b67a | 2014-09-02 16:06:21 -0700 | [diff] [blame] | 35 | 'sphinx.ext.todo', |
| 36 | ] |
| 37 | |
| 38 | def addExtensionIfExists(extension): |
Davide Pesavento | 872f18e | 2022-09-20 17:03:22 -0400 | [diff] [blame] | 39 | if importlib.util.find_spec(extension) is not None: |
Alexander Afanasyev | bd5b67a | 2014-09-02 16:06:21 -0700 | [diff] [blame] | 40 | extensions.append(extension) |
Davide Pesavento | 872f18e | 2022-09-20 17:03:22 -0400 | [diff] [blame] | 41 | else: |
| 42 | sys.stderr.write(f'WARNING: Extension {extension!r} not found. ' |
| 43 | 'Some documentation may not build correctly.\n') |
Alexander Afanasyev | bd5b67a | 2014-09-02 16:06:21 -0700 | [diff] [blame] | 44 | |
Davide Pesavento | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame] | 45 | addExtensionIfExists('sphinxcontrib.doxylink') |
Alexander Afanasyev | bd5b67a | 2014-09-02 16:06:21 -0700 | [diff] [blame] | 46 | |
Davide Pesavento | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame] | 47 | templates_path = ['_templates'] |
Davide Pesavento | 872f18e | 2022-09-20 17:03:22 -0400 | [diff] [blame] | 48 | exclude_patterns = ['Thumbs.db', '.DS_Store'] |
Alexander Afanasyev | bd5b67a | 2014-09-02 16:06:21 -0700 | [diff] [blame] | 49 | |
Alexander Afanasyev | bd5b67a | 2014-09-02 16:06:21 -0700 | [diff] [blame] | 50 | |
Davide Pesavento | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame] | 51 | # -- Options for HTML output ------------------------------------------------- |
Davide Pesavento | 872f18e | 2022-09-20 17:03:22 -0400 | [diff] [blame] | 52 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output |
Alexander Afanasyev | bd5b67a | 2014-09-02 16:06:21 -0700 | [diff] [blame] | 53 | |
Alexander Afanasyev | bd5b67a | 2014-09-02 16:06:21 -0700 | [diff] [blame] | 54 | html_theme = 'named_data_theme' |
Davide Pesavento | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame] | 55 | html_theme_path = ['.'] |
Alexander Afanasyev | bd5b67a | 2014-09-02 16:06:21 -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". |
| 60 | html_static_path = ['_static'] |
| 61 | |
Davide Pesavento | 3d01fa3 | 2021-10-03 17:13:38 -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 | |
Alexander Afanasyev | bd5b67a | 2014-09-02 16:06:21 -0700 | [diff] [blame] | 68 | |
Davide Pesavento | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame] | 69 | # -- Options for manual page output ------------------------------------------ |
Davide Pesavento | 872f18e | 2022-09-20 17:03:22 -0400 | [diff] [blame] | 70 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-manual-page-output |
Alexander Afanasyev | bd5b67a | 2014-09-02 16:06:21 -0700 | [diff] [blame] | 71 | |
| 72 | # One entry per manual page. List of tuples |
| 73 | # (source start file, name, description, authors, manual section). |
| 74 | man_pages = [ |
Davide Pesavento | 872f18e | 2022-09-20 17:03:22 -0400 | [diff] [blame] | 75 | ('manpages/ndns-daemon', 'ndns-daemon', 'Domain Name Service Daemon for Named Data Networking', None, 1), |
Alexander Afanasyev | bd5b67a | 2014-09-02 16:06:21 -0700 | [diff] [blame] | 76 | ] |
| 77 | |
Davide Pesavento | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame] | 78 | |
Davide Pesavento | 872f18e | 2022-09-20 17:03:22 -0400 | [diff] [blame] | 79 | # -- Misc options ------------------------------------------------------------ |
Alexander Afanasyev | bd5b67a | 2014-09-02 16:06:21 -0700 | [diff] [blame] | 80 | |
| 81 | doxylink = { |
Davide Pesavento | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame] | 82 | 'NDNS': ('NDNS.tag', 'doxygen/'), |
Alexander Afanasyev | bd5b67a | 2014-09-02 16:06:21 -0700 | [diff] [blame] | 83 | } |
| 84 | |
Davide Pesavento | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame] | 85 | extlinks = { |
Davide Pesavento | 872f18e | 2022-09-20 17:03:22 -0400 | [diff] [blame] | 86 | 'issue': ('https://redmine.named-data.net/issues/%s', 'issue #%s'), |
Davide Pesavento | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame] | 87 | } |