pradyunsg / furo

A clean customizable documentation theme for Sphinx
https://pradyunsg.me/furo/quickstart
MIT License
2.69k stars 309 forks source link

ERROR: Adding a table of contents in Furo-based documentation is unnecessary #619

Closed valeriofantozzi closed 1 year ago

valeriofantozzi commented 1 year ago

What's happening?

Hi, I get this error message. How do I solve it?

Screenshot 2023-02-13 at 12 04 17

Thanks :)

This is my config.py file:

project = 'SOC BT'          # change to your proj name
copyright = '2023, myname'      # change to your copyright information
author = 'myname'               # change to your author 
release = '0.1'                 # change to your release version

projLang = "cpp"                # define project language (cpp, c, python) <--------

templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']

html_theme = 'furo'
html_static_path = ['_static']          # A list of paths that contain extra templates
html_logo = './_static/Filo-Logo.png'

extensions = [
    'sphinx.ext.doctest',           # Test snippets in the documentation
    'sphinx_copybutton',            # Add a little “copy” button to the right of your code blocks
    'hoverxref.extension',          # Add tooltips on the cross references of the documentation with the content of the linked section
    'sphinx.ext.autodoc',           # Include documentation from docstrings
    'sphinx.ext.viewcode',          # Add links to highlighted source code
    'sphinx.ext.napoleon',          # Support for NumPy and Google style docstrings
]

if projLang in ["cpp", "c"]:    # <--------- cpp / c

    import shutil, os
    if os.path.isfile('./api'): 
        shutil.rmtree('./api')

    extensions += [
    # there may be others here already, e.g. 'sphinx.ext.mathjax'
    'breathe',
    'exhale',
    ]

    # Setup the breathe extension
    breathe_projects = { "My Project": "./_doxygen/xml" }
    breathe_default_project = "My Project"

    exhale_args = {     # Setup the exhale extension
        # These arguments are required
        "containmentFolder":     "./api",
        "rootFileName":          "library_root.rst",

        # Heavily encouraged optional argument (see docs)
        "rootFileTitle":         "Reference API",

        # Suggested optional arguments
        "createTreeView":        True,

        # TIP: if using the sphinx-bootstrap-theme, you need "treeViewIsBootstrap": True,
        "exhaleExecutesDoxygen": True,

        # "doxygenStripFromPath":  "../config",
        # "doxygenStripFromPath":  "../gecko_sdk_4.2.0",
        # "doxygenStripFromPath":  "../GNU ARM v10.3.1 - Default",
        # "doxygenStripFromPath":  "../autogen",

        # "exhaleDoxygenStdin":    "INPUT = .."

        "doxygenStripFromPath":  "..",
        "exhaleDoxygenStdin":    "INPUT = ../custom"

    }
    primary_domain = projLang       # Tell sphinx what the primary language being documented is.
    highlight_language = projLang   # Tell sphinx what the pygments highlight language should be.

    # breathe_implementation_filename_extensions = ['.c', '.cc', '.cpp']

elif projLang == "python":      # <--------- python
    extensions += [ 'autoapi.extension', ]          # auto api reference generator

    # AutoApi Config 
    # [ https://sphinx-autoapi.readthedocs.io/en/latest/reference/config.html#confval-autoapi_file_patterns ]
    autoapi_type = 'python'                         # Set the type of files you are documenting       
    autoapi_dirs = ['../scripts']                   # Paths (relative or absolute) to the source code that you wish to generate your API documentation from    
    # autoapi_file_patterns = ['*.py', '*.pyi']       # A list containing the file patterns to look for when generating documentation
    autoapi_add_toctree_entry = True                # Insert the generated documentation into the TOC tree.
    # autoapi_ignore = []                           # A list of patterns to ignore when finding files

Reproducer

.

Expectation

.

Code of Conduct

pradyunsg commented 1 year ago

Please don't file issues to ask for support.