sphinx-api-sidebar


Namesphinx-api-sidebar JSON
Version 0.3.2 PyPI version JSON
download
home_pagehttps://github.com/Yihengxiong6/sphinx_api_sidebar
SummaryDisplay any generated static API documentation in a sidebar
upload_time2023-11-15 07:11:03
maintainer
docs_urlNone
authorYiheng Xiong
requires_python
licenseMIT License Copyright (c) 2023 Yiheng Xiong Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Sphinx API Sidebar

A Sphinx extension for displaying any generated static API documentation in a sidebar.

## Overview

This Sphinx extension allows you to include and display static API documentation (e.g., `JavaDoc`, `Doxygen`) in the sidebar of your Sphinx documentation. It updates the `html_context` with the API documentation paths, which can then be used to render the API documentation sidebar template.

This extension serves as an immediate workaround to make Sphinx consume API docs in HTML format from various languages without building additional deeply integrated extensions for each type of API docs.

## Installation

To install the `sphinx-api-sidebar` extension, you can use pip:

```sh
pip install sphinx-api-sidebar
```

## Usage
1. To enable the sphinx-api-sidebar extension in your Sphinx documentation project, add it to the extensions list in your conf.py file:

```python
extensions = [
    'sphinx_api_sidebar',
    # Other extensions...
]
```

2. To use a custom command to generate your API documentation or specify different directories, you can set the `api_docs_generators` configuration value in your conf.py file:

```python
api_docs_generators = [
  {
    'command': '<your_api_docs_build_command_1>',
    'outputs': [
            {
                'name': '<generated_api_doc_name_1>',
                'path': '<path_to_generated_api_doc_1>' # path should be relative to the docs directory
            },
            {
                'name': '<generated_api_doc_name_2>',
                'path': '<path_to_generated_api_doc_2>'
            },
            # ...
        ]
  },
  {
    'command': '<your_custom_build_command_2>',
    'outputs': [
            {
                'name': '<generated_api_doc_name_3>',
                'path': '<path_to_generated_api_doc_3>'
            },
            # ...
        ]
  },
  # more groups of generated api docs
]
```

Replace `<your_custom_build_command_*>`, `<generated_api_doc_name_*>`, and `<path_to_generated_api_doc_*>` with the appropriate values for your project.

3. Update your `conf.py` file to include the `api_docs_sidebar.html` template in the html_sidebars configuration:

```python
html_sidebars = {
    '**': [
        # ... other sidebars ...
        'sidebar/api_docs_sidebar.html',
    ]
}
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Yihengxiong6/sphinx_api_sidebar",
    "name": "sphinx-api-sidebar",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Yiheng Xiong",
    "author_email": "Yiheng Xiong <georgex8866@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/e2/cc/1f4f161d7d2f0294438f74259d9b57b23c65150f3861e40c1cb7ebe1409a/sphinx_api_sidebar-0.3.2.tar.gz",
    "platform": null,
    "description": "# Sphinx API Sidebar\n\nA Sphinx extension for displaying any generated static API documentation in a sidebar.\n\n## Overview\n\nThis Sphinx extension allows you to include and display static API documentation (e.g., `JavaDoc`, `Doxygen`) in the sidebar of your Sphinx documentation. It updates the `html_context` with the API documentation paths, which can then be used to render the API documentation sidebar template.\n\nThis extension serves as an immediate workaround to make Sphinx consume API docs in HTML format from various languages without building additional deeply integrated extensions for each type of API docs.\n\n## Installation\n\nTo install the `sphinx-api-sidebar` extension, you can use pip:\n\n```sh\npip install sphinx-api-sidebar\n```\n\n## Usage\n1. To enable the sphinx-api-sidebar extension in your Sphinx documentation project, add it to the extensions list in your conf.py file:\n\n```python\nextensions = [\n    'sphinx_api_sidebar',\n    # Other extensions...\n]\n```\n\n2. To use a custom command to generate your API documentation or specify different directories, you can set the `api_docs_generators` configuration value in your conf.py file:\n\n```python\napi_docs_generators = [\n  {\n    'command': '<your_api_docs_build_command_1>',\n    'outputs': [\n            {\n                'name': '<generated_api_doc_name_1>',\n                'path': '<path_to_generated_api_doc_1>' # path should be relative to the docs directory\n            },\n            {\n                'name': '<generated_api_doc_name_2>',\n                'path': '<path_to_generated_api_doc_2>'\n            },\n            # ...\n        ]\n  },\n  {\n    'command': '<your_custom_build_command_2>',\n    'outputs': [\n            {\n                'name': '<generated_api_doc_name_3>',\n                'path': '<path_to_generated_api_doc_3>'\n            },\n            # ...\n        ]\n  },\n  # more groups of generated api docs\n]\n```\n\nReplace `<your_custom_build_command_*>`, `<generated_api_doc_name_*>`, and `<path_to_generated_api_doc_*>` with the appropriate values for your project.\n\n3. Update your `conf.py` file to include the `api_docs_sidebar.html` template in the html_sidebars configuration:\n\n```python\nhtml_sidebars = {\n    '**': [\n        # ... other sidebars ...\n        'sidebar/api_docs_sidebar.html',\n    ]\n}\n```\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2023 Yiheng Xiong  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "Display any generated static API documentation in a sidebar",
    "version": "0.3.2",
    "project_urls": {
        "Homepage": "https://github.com/Yihengxiong6/sphinx_api_sidebar"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "43749783c446be0ea589220fff35dd1781bd02abd198aa84eff0dc90233c2377",
                "md5": "51be6ad01d3a72ad27a5b296cf724db3",
                "sha256": "d5dde6707b9cfccb9e76d282d63646849766c3d981385bd46ae77cbe9ca590db"
            },
            "downloads": -1,
            "filename": "sphinx_api_sidebar-0.3.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "51be6ad01d3a72ad27a5b296cf724db3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 5438,
            "upload_time": "2023-11-15T07:11:02",
            "upload_time_iso_8601": "2023-11-15T07:11:02.443368Z",
            "url": "https://files.pythonhosted.org/packages/43/74/9783c446be0ea589220fff35dd1781bd02abd198aa84eff0dc90233c2377/sphinx_api_sidebar-0.3.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e2cc1f4f161d7d2f0294438f74259d9b57b23c65150f3861e40c1cb7ebe1409a",
                "md5": "fbba1bb9cb87c29fef05a594465a2c20",
                "sha256": "c35d4cefff58f05aa9a7411dbecdf74b376c50e06bd7bdf8f9299f33ca00b95b"
            },
            "downloads": -1,
            "filename": "sphinx_api_sidebar-0.3.2.tar.gz",
            "has_sig": false,
            "md5_digest": "fbba1bb9cb87c29fef05a594465a2c20",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4766,
            "upload_time": "2023-11-15T07:11:03",
            "upload_time_iso_8601": "2023-11-15T07:11:03.927913Z",
            "url": "https://files.pythonhosted.org/packages/e2/cc/1f4f161d7d2f0294438f74259d9b57b23c65150f3861e40c1cb7ebe1409a/sphinx_api_sidebar-0.3.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-15 07:11:03",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Yihengxiong6",
    "github_project": "sphinx_api_sidebar",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "sphinx-api-sidebar"
}
        
Elapsed time: 0.14038s