Skip to content

Commit

Permalink
feat!: Remove sphinx_toctree_autodoc_fix (Superseded by sphinx 5.2+)
Browse files Browse the repository at this point in the history
  • Loading branch information
tony committed Sep 24, 2022
1 parent d8ff8cd commit 5e1fdd5
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 123 deletions.
24 changes: 13 additions & 11 deletions README.md
Expand Up @@ -134,21 +134,23 @@ See more: <https://gp-libs.git-pull.com/linkify_issues/>

### Table of contents for autodoc

`sphinx.ext.autodoc` doesn't link objects in the table of contents. So we need a
plugin to help.
Removed in v0.0.1a12.

See more: <https://gp-libs.git-pull.com/sphinx_toctree_autodoc_fix/>
[Sphinx 5.2](https://pypi.org/project/Sphinx/5.2.0) bakes this in by default:

#### Configuration
Settings options:

1. Add `'sphinx_toctree_autodoc_fix'` to `extensions`
- `add_function_parentheses = False` (default: `True`)
- `toc_object_entries_show_parents` can be (default: `'domain'`):
- `toc_object_entries_show_parents = 'domain'`
- `toc_object_entries_show_parents = 'hide'`
- `toc_object_entries_show_parents = 'all'`

```python
extensions = [
# ...
"sphinx_toctree_autodoc_fix",
]
```
See also:

- https://github.com/sphinx-doc/sphinx/issues/6316
- https://github.com/sphinx-doc/sphinx/pull/10807
- https://gist.github.com/agoose77/e8f0f8f7d7133e73483ca5c2dd7b907f

## Install

Expand Down
4 changes: 3 additions & 1 deletion docs/conf.py
Expand Up @@ -35,7 +35,6 @@
"sphinxext.rediraffe",
"myst_parser",
"linkify_issues",
"sphinx_toctree_autodoc_fix",
]
myst_enable_extensions = [
"colon_fence",
Expand Down Expand Up @@ -94,6 +93,9 @@
]
}

# sphinx.ext.autoapi
toc_object_entries_show_parents = "hide"

# linkify_issues
issue_url_tpl = f'{about["__github__"]}/issues/{{issue_id}}'

Expand Down
1 change: 0 additions & 1 deletion docs/index.md
Expand Up @@ -9,7 +9,6 @@
quickstart
doctest/index
sphinx_toctree_autodoc_fix/index
linkify_issues/index
```

Expand Down
31 changes: 0 additions & 31 deletions docs/sphinx_toctree_autodoc_fix/index.md

This file was deleted.

79 changes: 0 additions & 79 deletions tests/test_sphinx_toctree_autodoc_fix.py

This file was deleted.

0 comments on commit 5e1fdd5

Please sign in to comment.