Alexander Afanasyev | 49272f7 | 2014-04-06 21:49:46 -0700 | [diff] [blame] | 1 | # -*- coding: utf-8 -*- |
| 2 | # |
Davide Pesavento | 08b91c8 | 2019-04-13 19:42:10 -0400 | [diff] [blame] | 3 | # Configuration file for the Sphinx documentation builder. |
Alexander Afanasyev | 49272f7 | 2014-04-06 21:49:46 -0700 | [diff] [blame] | 4 | # |
Davide Pesavento | 08b91c8 | 2019-04-13 19:42:10 -0400 | [diff] [blame] | 5 | # This file only contains a selection of the most common options. For a full |
| 6 | # list see the documentation: |
| 7 | # http://www.sphinx-doc.org/en/master/config |
Alexander Afanasyev | 49272f7 | 2014-04-06 21:49:46 -0700 | [diff] [blame] | 8 | |
Davide Pesavento | 08b91c8 | 2019-04-13 19:42:10 -0400 | [diff] [blame] | 9 | # -- Path setup -------------------------------------------------------------- |
Alexander Afanasyev | 49272f7 | 2014-04-06 21:49:46 -0700 | [diff] [blame] | 10 | |
| 11 | # If extensions (or modules to document with autodoc) are in another directory, |
| 12 | # add these directories to sys.path here. If the directory is relative to the |
| 13 | # documentation root, use os.path.abspath to make it absolute, like shown here. |
Davide Pesavento | 08b91c8 | 2019-04-13 19:42:10 -0400 | [diff] [blame] | 14 | # |
| 15 | import os |
| 16 | import sys |
| 17 | # sys.path.insert(0, os.path.abspath('.')) |
Alexander Afanasyev | 49272f7 | 2014-04-06 21:49:46 -0700 | [diff] [blame] | 18 | |
Davide Pesavento | 0064c1d | 2018-03-03 18:43:53 -0500 | [diff] [blame] | 19 | |
Davide Pesavento | 08b91c8 | 2019-04-13 19:42:10 -0400 | [diff] [blame] | 20 | # -- Project information ----------------------------------------------------- |
| 21 | |
| 22 | project = u'Named Data Networking Forwarding Daemon (NFD)' |
| 23 | copyright = u'Copyright © 2014-2019 Named Data Networking Project.' |
| 24 | author = u'Named Data Networking Project' |
| 25 | |
| 26 | # The short X.Y version |
| 27 | #version = '' |
| 28 | |
| 29 | # The full version, including alpha/beta/rc tags |
| 30 | #release = '' |
| 31 | |
| 32 | # There are two options for replacing |today|: either, you set today to some |
| 33 | # non-false value, then it is used: |
| 34 | #today = '' |
| 35 | # Else, today_fmt is used as the format for a strftime call. |
| 36 | today_fmt = '%Y-%m-%d' |
| 37 | |
| 38 | |
| 39 | # -- General configuration --------------------------------------------------- |
Alexander Afanasyev | 49272f7 | 2014-04-06 21:49:46 -0700 | [diff] [blame] | 40 | |
| 41 | # If your documentation needs a minimal Sphinx version, state it here. |
Davide Pesavento | 0064c1d | 2018-03-03 18:43:53 -0500 | [diff] [blame] | 42 | # |
Davide Pesavento | 08b91c8 | 2019-04-13 19:42:10 -0400 | [diff] [blame] | 43 | needs_sphinx = '1.1' |
Alexander Afanasyev | 49272f7 | 2014-04-06 21:49:46 -0700 | [diff] [blame] | 44 | |
| 45 | # Add any Sphinx extension module names here, as strings. They can be |
| 46 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
| 47 | # ones. |
| 48 | extensions = [ |
Davide Pesavento | 08b91c8 | 2019-04-13 19:42:10 -0400 | [diff] [blame] | 49 | 'sphinx.ext.extlinks', |
Alexander Afanasyev | 49272f7 | 2014-04-06 21:49:46 -0700 | [diff] [blame] | 50 | 'sphinx.ext.todo', |
| 51 | ] |
| 52 | |
Alexander Afanasyev | 2075788 | 2014-08-25 22:39:08 -0700 | [diff] [blame] | 53 | def addExtensionIfExists(extension): |
| 54 | try: |
| 55 | __import__(extension) |
| 56 | extensions.append(extension) |
| 57 | except ImportError: |
Davide Pesavento | 08b91c8 | 2019-04-13 19:42:10 -0400 | [diff] [blame] | 58 | sys.stderr.write("Extension '%s' not found. " |
Alexander Afanasyev | 2075788 | 2014-08-25 22:39:08 -0700 | [diff] [blame] | 59 | "Some documentation may not build correctly.\n" % extension) |
Alexander Afanasyev | 2075788 | 2014-08-25 22:39:08 -0700 | [diff] [blame] | 60 | |
Eric Newberry | 3406dc9 | 2018-03-25 14:28:50 -0700 | [diff] [blame] | 61 | if sys.version_info[0] >= 3: |
| 62 | addExtensionIfExists('sphinxcontrib.doxylink') |
Alexander Afanasyev | 2075788 | 2014-08-25 22:39:08 -0700 | [diff] [blame] | 63 | |
Davide Pesavento | 0064c1d | 2018-03-03 18:43:53 -0500 | [diff] [blame] | 64 | # sphinxcontrib.googleanalytics is currently not working with the latest version of Sphinx |
| 65 | # if os.getenv('GOOGLE_ANALYTICS', None): |
| 66 | # addExtensionIfExists('sphinxcontrib.googleanalytics') |
Alexander Afanasyev | 2075788 | 2014-08-25 22:39:08 -0700 | [diff] [blame] | 67 | |
Alexander Afanasyev | 49272f7 | 2014-04-06 21:49:46 -0700 | [diff] [blame] | 68 | # The master toctree document. |
| 69 | master_doc = 'index' |
| 70 | |
Davide Pesavento | 08b91c8 | 2019-04-13 19:42:10 -0400 | [diff] [blame] | 71 | # Add any paths that contain templates here, relative to this directory. |
| 72 | templates_path = ['_templates'] |
Alexander Afanasyev | 49272f7 | 2014-04-06 21:49:46 -0700 | [diff] [blame] | 73 | |
| 74 | # List of patterns, relative to source directory, that match files and |
| 75 | # directories to ignore when looking for source files. |
Davide Pesavento | 08b91c8 | 2019-04-13 19:42:10 -0400 | [diff] [blame] | 76 | # This pattern also affects html_static_path and html_extra_path. |
Alexander Afanasyev | 49272f7 | 2014-04-06 21:49:46 -0700 | [diff] [blame] | 77 | exclude_patterns = [] |
| 78 | |
Alexander Afanasyev | 49272f7 | 2014-04-06 21:49:46 -0700 | [diff] [blame] | 79 | |
Davide Pesavento | 08b91c8 | 2019-04-13 19:42:10 -0400 | [diff] [blame] | 80 | # -- Options for HTML output ------------------------------------------------- |
Alexander Afanasyev | 49272f7 | 2014-04-06 21:49:46 -0700 | [diff] [blame] | 81 | |
| 82 | # The theme to use for HTML and HTML Help pages. See the documentation for |
| 83 | # a list of builtin themes. |
Davide Pesavento | 0064c1d | 2018-03-03 18:43:53 -0500 | [diff] [blame] | 84 | # |
Alexander Afanasyev | 49272f7 | 2014-04-06 21:49:46 -0700 | [diff] [blame] | 85 | html_theme = 'named_data_theme' |
| 86 | |
Alexander Afanasyev | 49272f7 | 2014-04-06 21:49:46 -0700 | [diff] [blame] | 87 | # Add any paths that contain custom themes here, relative to this directory. |
Davide Pesavento | 0064c1d | 2018-03-03 18:43:53 -0500 | [diff] [blame] | 88 | html_theme_path = ['.'] |
Alexander Afanasyev | 49272f7 | 2014-04-06 21:49:46 -0700 | [diff] [blame] | 89 | |
| 90 | # Add any paths that contain custom static files (such as style sheets) here, |
| 91 | # relative to this directory. They are copied after the builtin static files, |
| 92 | # so a file named "default.css" will overwrite the builtin "default.css". |
| 93 | html_static_path = ['_static'] |
| 94 | |
Alexander Afanasyev | 49272f7 | 2014-04-06 21:49:46 -0700 | [diff] [blame] | 95 | |
Davide Pesavento | 08b91c8 | 2019-04-13 19:42:10 -0400 | [diff] [blame] | 96 | # -- Options for LaTeX output ------------------------------------------------ |
Alexander Afanasyev | 49272f7 | 2014-04-06 21:49:46 -0700 | [diff] [blame] | 97 | |
| 98 | latex_elements = { |
Davide Pesavento | 0064c1d | 2018-03-03 18:43:53 -0500 | [diff] [blame] | 99 | # The paper size ('letterpaper' or 'a4paper'). |
| 100 | # |
| 101 | # 'papersize': 'letterpaper', |
Alexander Afanasyev | 49272f7 | 2014-04-06 21:49:46 -0700 | [diff] [blame] | 102 | |
Davide Pesavento | 0064c1d | 2018-03-03 18:43:53 -0500 | [diff] [blame] | 103 | # The font size ('10pt', '11pt' or '12pt'). |
| 104 | # |
| 105 | # 'pointsize': '10pt', |
Alexander Afanasyev | 49272f7 | 2014-04-06 21:49:46 -0700 | [diff] [blame] | 106 | |
Davide Pesavento | 0064c1d | 2018-03-03 18:43:53 -0500 | [diff] [blame] | 107 | # Additional stuff for the LaTeX preamble. |
| 108 | # |
| 109 | # 'preamble': '', |
| 110 | |
| 111 | # Latex figure (float) alignment |
| 112 | # |
| 113 | # 'figure_align': 'htbp', |
Alexander Afanasyev | 49272f7 | 2014-04-06 21:49:46 -0700 | [diff] [blame] | 114 | } |
| 115 | |
| 116 | # Grouping the document tree into LaTeX files. List of tuples |
| 117 | # (source start file, target name, title, |
| 118 | # author, documentclass [howto, manual, or own class]). |
| 119 | latex_documents = [ |
Davide Pesavento | 08b91c8 | 2019-04-13 19:42:10 -0400 | [diff] [blame] | 120 | ('index', 'nfd-docs.tex', u'Named Data Networking Forwarding Daemon (NFD)', |
| 121 | author, 'manual'), |
Alexander Afanasyev | 49272f7 | 2014-04-06 21:49:46 -0700 | [diff] [blame] | 122 | ] |
| 123 | |
Alexander Afanasyev | 49272f7 | 2014-04-06 21:49:46 -0700 | [diff] [blame] | 124 | |
Davide Pesavento | 08b91c8 | 2019-04-13 19:42:10 -0400 | [diff] [blame] | 125 | # -- Options for manual page output ------------------------------------------ |
Alexander Afanasyev | 49272f7 | 2014-04-06 21:49:46 -0700 | [diff] [blame] | 126 | |
| 127 | # One entry per manual page. List of tuples |
| 128 | # (source start file, name, description, authors, manual section). |
| 129 | man_pages = [ |
Davide Pesavento | 08b91c8 | 2019-04-13 19:42:10 -0400 | [diff] [blame] | 130 | ('manpages/nfd', 'nfd', 'the Named Data Networking Forwarding Daemon', [], 1), |
| 131 | ('manpages/nfdc', 'nfdc', 'interact with NFD management from the command line', [], 1), |
| 132 | ('manpages/nfdc-status', 'nfdc-status', 'show NFD status', [], 1), |
| 133 | ('manpages/nfdc-face', 'nfdc-face', 'show and manipulate NFD\'s faces', [], 1), |
| 134 | ('manpages/nfdc-route', 'nfdc-route', 'show and manipulate NFD\'s routes', [], 1), |
| 135 | ('manpages/nfdc-cs', 'nfdc-cs', 'show and manipulate NFD\'s Content Store', [], 1), |
| 136 | ('manpages/nfdc-strategy', 'nfdc-strategy', 'show and manipulate NFD\'s strategy choices', [], 1), |
| 137 | ('manpages/nfd-status', 'nfd-status', 'show a comprehensive report of NFD\'s status', [], 1), |
| 138 | ('manpages/nfd-status-http-server', 'nfd-status-http-server', 'NFD status HTTP server', [], 1), |
| 139 | ('manpages/ndn-autoconfig-server', 'ndn-autoconfig-server', 'auto-configuration server for NDN', [], 1), |
| 140 | ('manpages/ndn-autoconfig', 'ndn-autoconfig', 'auto-configuration client for NDN', [], 1), |
| 141 | ('manpages/ndn-autoconfig.conf', 'ndn-autoconfig.conf', 'configuration file for ndn-autoconfig', [], 5), |
| 142 | ('manpages/nfd-autoreg', 'nfd-autoreg', 'NFD automatic prefix registration daemon', [], 1), |
| 143 | ('manpages/nfd-asf-strategy', 'nfd-asf-strategy', 'NFD ASF strategy', [], 7), |
Alexander Afanasyev | 49272f7 | 2014-04-06 21:49:46 -0700 | [diff] [blame] | 144 | ] |
| 145 | |
Davide Pesavento | 08b91c8 | 2019-04-13 19:42:10 -0400 | [diff] [blame] | 146 | # If true, show URL addresses after external links. |
| 147 | #man_show_urls = True |
Alexander Afanasyev | 49272f7 | 2014-04-06 21:49:46 -0700 | [diff] [blame] | 148 | |
Davide Pesavento | 0064c1d | 2018-03-03 18:43:53 -0500 | [diff] [blame] | 149 | |
Davide Pesavento | 08b91c8 | 2019-04-13 19:42:10 -0400 | [diff] [blame] | 150 | # -- Custom options ---------------------------------------------------------- |
Alexander Afanasyev | 2075788 | 2014-08-25 22:39:08 -0700 | [diff] [blame] | 151 | |
| 152 | doxylink = { |
Davide Pesavento | 08b91c8 | 2019-04-13 19:42:10 -0400 | [diff] [blame] | 153 | 'nfd': ('NFD.tag', 'doxygen/'), |
| 154 | } |
| 155 | |
| 156 | extlinks = { |
| 157 | 'issue': ('https://redmine.named-data.net/issues/%s', 'issue #'), |
Alexander Afanasyev | 2075788 | 2014-08-25 22:39:08 -0700 | [diff] [blame] | 158 | } |
| 159 | |
| 160 | if os.getenv('GOOGLE_ANALYTICS', None): |
| 161 | googleanalytics_id = os.environ['GOOGLE_ANALYTICS'] |
| 162 | googleanalytics_enabled = True |