gnunet-handbook

The GNUnet Handbook
Log | Files | Refs

conf.py (4840B)


      1 # Configuration file for the Sphinx documentation builder.
      2 #
      3 # This file only contains a selection of the most common options. For a full
      4 # list see the documentation:
      5 # https://www.sphinx-doc.org/en/master/usage/configuration.html
      6 
      7 # -- Path setup --------------------------------------------------------------
      8 
      9 # If extensions (or modules to document with autodoc) are in another directory,
     10 # add these directories to sys.path here. If the directory is relative to the
     11 # documentation root, use os.path.abspath to make it absolute, like shown here.
     12 #
     13 # import os
     14 # import sys
     15 # sys.path.insert(0, os.path.abspath('.'))
     16 
     17 
     18 # -- Project information -----------------------------------------------------
     19 import datetime
     20 import sys
     21 import os
     22 
     23 project = 'GNUnet'
     24 copyright = f'{datetime.date.today().year}, GNUnet Project'
     25 author = 'GNUnet Project'
     26 
     27 sys.path.append(os.path.abspath("_exts"))
     28 
     29 # -- General configuration ---------------------------------------------------
     30 
     31 # Add any Sphinx extension module names here, as strings. They can be
     32 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
     33 # ones.
     34 extensions = [
     35   'httpdomain',
     36   'typescriptdomain',
     37   'sphinx.ext.todo',
     38 ]
     39 
     40 if os.environ.get("SPHINX_MULTIVERSION"):
     41     extensions.append('sphinx_multiversion')
     42 
     43 #breathe_projects = {
     44 #    "gnunet": "../gnunet/doc/doxygen/xml/",
     45 #}
     46 
     47 #breathe_default_project = "gnunet"
     48 
     49 # Add any paths that contain templates here, relative to this directory.
     50 templates_path = ['_templates']
     51 
     52 # List of patterns, relative to source directory, that match files and
     53 # directories to ignore when looking for source files.
     54 # This pattern also affects html_static_path and html_extra_path.
     55 exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
     56 
     57 
     58 # -- Options for HTML output -------------------------------------------------
     59 
     60 # The theme to use for HTML and HTML Help pages.  See the documentation for
     61 # a list of builtin themes.
     62 #
     63 html_theme = 'sphinx_rtd_theme'
     64 
     65 html_sidebars = {
     66     "**": ["globaltoc.html", "versioning.html"]
     67 }
     68 
     69 html_theme_options = {
     70     #'logo_only': True,
     71     'display_version': True,
     72     'collapse_navigation': True,
     73 }
     74 
     75 man_make_section_directory = False
     76 man_pages = [
     77         ('about', 'gnunet', 'About GNUnet', '', '1'),
     78         ('installing', 'gnunet', 'Installing GNUnet', '', '2'),
     79         ('users/start', 'gnunet', 'Running your peer', '', '3'),
     80         ('gns/index', 'gnunet', 'The GNU Name System', '', '4'),
     81         ('users/reclaim', 'gnunet', 're:claimID', '', '5'),
     82         ('users/fs', 'gnunet', 'GNUnet File-Sharing', '', '6'),
     83         ('users/vpn', 'gnunet', 'GNUnet VPN', '', '7'),
     84         ('users/messenger', 'gnunet', 'GNUnet Messenger', '', '8'),
     85         ('users/configuration', 'gnunet', 'GNUnet advanced configuration', '', '9'),
     86         ('developers/contributing', 'gnunet-dev', 'Contributing', '', '1'),
     87         ('developers/style', 'gnunet-dev', 'Style and workflow', '', '2'),
     88         ('developers/util', 'gnunet-dev', 'libgnunetutil', '', '3'),
     89         ('developers/rest-api/index', 'gnunet-dev', 'REST API', '', '5'),
     90         ('developers/tutorial', 'gnunet-dev', 'GNUnet Developer Tutorial', '', '6'),
     91         ('developers/livingstandards', 'lsd', 'Living Standards', '', '1'),
     92 ]
     93 
     94 # Add any paths that contain custom static files (such as style sheets) here,
     95 # relative to this directory. They are copied after the builtin static files,
     96 # so a file named "default.css" will overwrite the builtin "default.css".
     97 html_static_path = ['_static']
     98 
     99 # These paths are either relative to html_static_path
    100 # or fully qualified paths (eg. https://...)
    101 html_css_files = [
    102     'css/custom.css',
    103 ]
    104 
    105 html_logo = "images/gnunet-blue.png"
    106 
    107 # Display to-do items in docs
    108 todo_include_todos = True
    109 
    110 primary_domain = "c"
    111 
    112 highlight_language = "c"
    113 
    114 rst_prolog = f"""
    115 .. role:: c(code)
    116    :language: c
    117 
    118 .. role:: bolditalic
    119    :class: bolditalic
    120 """
    121 
    122 # Append (do not overwrite) so that the roles defined above stay available.
    123 rst_prolog += "\n.. |gnunet_version| replace:: " + \
    124     os.environ.get("GNUNET_VERSION", "latest") + "\n"
    125 
    126 # Whitelist pattern for tags (set to None to ignore all tags)
    127 #smv_tag_whitelist = r'^.*$'
    128 smv_tag_whitelist = 'latest'
    129 
    130 # Whitelist pattern for branches (set to None to ignore all branches)
    131 smv_branch_whitelist = r'^(v\d+\.\d+\.x|master)$'
    132 #smv_branch_whitelist = 'master'
    133 
    134 # Whitelist pattern for remotes (set to None to use local branches only)
    135 smv_remote_whitelist = None
    136 
    137 # Pattern for released versions
    138 smv_released_pattern = r'^refs/(tags/latest|heads/(?!master)).*$'
    139 #smv_released_pattern = r'^refs/(heads/[^/]+)/(?!master).*$'
    140 
    141 # Format for versioned output directories inside the build directory
    142 smv_outputdir_format = '{ref.name}'
    143 
    144 # Determines whether remote or local git branches/tags are preferred if their output dirs conflict
    145 smv_prefer_remote_refs = False