/ docs / source / conf.py
conf.py
  1  # -- Path setup --------------------------------------------------------------
  2  
  3  # If extensions (or modules to document with autodoc) are in another directory,
  4  # add these directories to sys.path here. If the directory is relative to the
  5  # documentation root, use os.path.abspath to make it absolute, like shown here.
  6  #
  7  import os
  8  import sys
  9  sys.path.insert(0, os.path.abspath('../..'))
 10  
 11  # -- Project information -----------------------------------------------------
 12  project = 'Reticulum Network Stack'
 13  copyright = '2023, Mark Qvist'
 14  author = 'Mark Qvist'
 15  
 16  exec(open("../../RNS/_version.py", "r").read())
 17  version = __version__
 18  
 19  # The full version, including alpha/beta/rc tags
 20  import RNS
 21  release = RNS._version.__version__
 22  
 23  # -- General configuration ---------------------------------------------------
 24  extensions = [
 25      "sphinx.ext.autodoc",
 26      "sphinx_copybutton",
 27  ]
 28  
 29  autodoc_member_order = "bysource"
 30  toc_object_entries_show_parents = "hide"
 31  autodoc_preserve_defaults = True
 32  # add_module_names = False
 33  # latex_toplevel_sectioning = 'section'
 34  
 35  # Add any paths that contain templates here, relative to this directory.
 36  templates_path = ["_templates"]
 37  
 38  # List of patterns, relative to source directory, that match files and
 39  # directories to ignore when looking for source files.
 40  # This pattern also affects html_static_path and html_extra_path.
 41  exclude_patterns = []
 42  
 43  
 44  # -- Options for HTML output -------------------------------------------------
 45  html_show_sphinx = True
 46  html_theme = "furo"
 47  html_logo = "graphics/rns_logo_512.png"
 48  html_theme_options = {
 49      "top_of_page_button": None,
 50      # "footer_icons": [
 51      #     {
 52      #         "name": "GitHub",
 53      #         "url": "https://github.com/markqvist/reticulum",
 54      #         "html": """
 55      #             <svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16">
 56      #                 <path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path>
 57      #             </svg>
 58      #         """,
 59      #         "class": "",
 60      #     },
 61      # ],
 62      "dark_css_variables": {
 63          "color-background-primary": "#202b38",
 64          "color-background-secondary": "#161f27",
 65          "color-foreground-primary": "#dbdbdb",
 66          "color-foreground-secondary": "#a9b1ba",
 67          "color-brand-primary": "#41adff",
 68          "color-background-hover": "#161f27",
 69          "color-api-name": "#ffbe85",
 70          "color-api-pre-name": "#efae75",
 71      },
 72      # "announcement": "Announcement content",
 73  }
 74  
 75  html_static_path = ["_static"]
 76  html_css_files = [
 77      'custom.css',
 78  ]
 79  
 80  # html_theme = "pydata_sphinx_theme"
 81  # html_theme_options = {
 82  #     "navbar_start": ["navbar-logo"],
 83  #     "navbar_center": ["navbar-nav"],
 84  #     "navbar_end": ["navbar-icon-links"],
 85  #     "navbar_align": "left",
 86  #     "left_sidebar_end": [],
 87  #     "show_nav_level": 5,
 88  #     "navigation_depth": 5,
 89  #     "collapse_navigation": True,
 90  # }
 91  # html_sidebars = {
 92  #     "**": ["sidebar-nav-bs"]
 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  
 98  # def check_skip_member(app, what, name, obj, skip, options):
 99  #     print(what, " | ", name, " | ", obj, " | ", skip, " | ", options)
100  #     return False
101  
102  # def setup(app):
103  #     app.connect('autodoc-skip-member', check_skip_member)