sphinx-doc / sphinx-doc/sphinx

Adding colour/formatting to individual API's in sphinx autodoc

Open
#9,862 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

extensions:autodoc type:enhancement
Dominant language
Python
Stars
8k
Forks
2.6k
PR merge metrics
No merged PRs in 30d

Description

Hello,

I'm using sphinx automodule feature like below

.. automodule:: <module_name>
:members:
:special-members:
:private-members:

it displays the member API's along with docstrings module correctly, I would like to know if there is a way to specify color or make the the individual API members Bolder. Since the API documentation is already developed, I would not like to change the actual code and would be great if I can get a way to make the changes in rst files only.

Describe the solution you'd like
A clear and concise description of what you want to happen.

I have gone through online documentation and there seems to be no viable solution for this, https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The request concerns Sphinx's autodoc automodule directive and styling individual API members from RST files; start with the linked autodoc documentation and the existing automodule usage. Done means documenting a viable RST-only way to make individual members colored or bold, or clearly establishing that the feature is not supported.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.