<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/Documentation/conf.py, branch v7.0-rc7</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v7.0-rc7</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v7.0-rc7'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-01-23T18:59:34+00:00</updated>
<entry>
<title>Documentation: use a source-read extension for the index link boilerplate</title>
<updated>2026-01-23T18:59:34+00:00</updated>
<author>
<name>Jani Nikula</name>
<email>jani.nikula@intel.com</email>
</author>
<published>2026-01-23T14:31:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a592a36e49372172d7c7551ec19ed18184c935e1'/>
<id>urn:sha1:a592a36e49372172d7c7551ec19ed18184c935e1</id>
<content type='text'>
The root document usually has a special :ref:`genindex` link to the
generated index. This is also the case for Documentation/index.rst. The
other index.rst files deeper in the directory hierarchy usually don't.

For SPHINXDIRS builds, the root document isn't Documentation/index.rst,
but some other index.rst in the hierarchy. Currently they have a
".. only::" block to add the index link when doing SPHINXDIRS html
builds.

This is obviously very tedious and repetitive. The link is also added to
all index.rst files in the hierarchy for SPHINXDIRS builds, not just the
root document.

Put the boilerplate in a sphinx-includes/subproject-index.rst file, and
include it at the end of the root document for subproject builds in an
ad-hoc source-read extension defined in conf.py.

For now, keep having the boilerplate in translations, because this
approach currently doesn't cover translated index link headers.

Cc: Jonathan Corbet &lt;corbet@lwn.net&gt;
Cc: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
Cc: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Signed-off-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
Tested-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
Reviewed-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
[jc: did s/doctree/kern_doc_dir/ ]
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
Message-ID: &lt;20260123143149.2024303-1-jani.nikula@intel.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'mauro' into docs-mw</title>
<updated>2026-01-23T18:46:08+00:00</updated>
<author>
<name>Jonathan Corbet</name>
<email>corbet@lwn.net</email>
</author>
<published>2026-01-23T18:46:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=330367bdc176a8f52cc4c5065ba0312277202dee'/>
<id>urn:sha1:330367bdc176a8f52cc4c5065ba0312277202dee</id>
<content type='text'>
Mauro's work to include documentation from our Python modules.  His cover
letter follows:

This is an extended version of:
    https://lore.kernel.org/linux-doc/cover.1768488832.git.mchehab+huawei@kernel.org/

It basically adds everything we currently have inside libs/tool/python
to "tools" book inside documentation.

This version should be independent of the other series yet to be merged,
(including the jobserver one).

The vast amount of changes here are docstring cleanups and additions.
They mainly consists on:

- ensuring that every phrase will end with a period, making it uniform
  along all files;
- cleaning ups to better uniform docstrings;
- variable descriptions now use "#:" markup, as it allows autodoc to
  add them inside the documentation;
- added some missing docstrings;
- some new blank lines at comments to make ReST syntax parser happy;
- add a couple of sphinx markups (mainly, code blocks).

Most of those are minor changes, affecting only comments.

It also has one patch per libarary type, adding them to docs.

For kernel-doc, I did the cleanups first, as there is one code block
inside tools/lib/python/kdoc/latex_fonts.py that would cause a Sphinx
crash without such markups.

The series actually starts with 3 fixes:

- avoid "*" markups on indexes with deep&gt; 3 to override text
- a variable rename to stop abusing doctree name
- don't rely on cwd to get Documentation/ location

patch 4 adds support to document scripts either at:
    - tools/
    - scripts/

patch 5 contains a CSS to better display autodoc html output.

For those who want to play with documentation, documenting a python
file is very simple. All it takes is to use:

    .. automodule:: lib.python.&lt;dir+name&gt;

Usually, we add a couple of control members to it to adjust
the desired documentation scope (add/remove members, showing class
inheritance, showing members that currently don't have
docstrings, etc). That's why we're using:

    .. automodule:: lib.python.kdoc.enrich_formatter
       :members:
       :show-inheritance:
       :undoc-members:

(and similar) inside tools/kdoc*.rst.

autodoc allows filtering in/out members, file docstrings, etc.

It also allows documenting just some members or functions with
directives like:

    ..autofunction:
    ..automember:

Sphinx also has a helper script to generate .rst files with
documentation:

    $ sphinx-apidoc -o foobar tools/lib/python/

which can be helpful to discover what should be documented,
although changes are needed to use what it produces.
</content>
</entry>
<entry>
<title>docs: enable Sphinx autodoc extension to allow documenting python</title>
<updated>2026-01-23T18:37:38+00:00</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab+huawei@kernel.org</email>
</author>
<published>2026-01-19T16:23:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6a4931a7fe00c3987691a7a8c0b22a9bb96f432b'/>
<id>urn:sha1:6a4931a7fe00c3987691a7a8c0b22a9bb96f432b</id>
<content type='text'>
Adding python documentation is simple with Sphinx: all we need
is to include the ext.autodoc extension and add the directories
where the Python code sits at the sys.path.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
Message-ID: &lt;29cbe375dc418d6fa5793f55199799b5b52dcd38.1768838938.git.mchehab+huawei@kernel.org&gt;
</content>
</entry>
<entry>
<title>docs: conf: don't rely on cwd to get documentation location</title>
<updated>2026-01-23T18:37:38+00:00</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab+huawei@kernel.org</email>
</author>
<published>2026-01-19T16:23:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f123cffb000987bfc04f2463cc33bae2b2c1d590'/>
<id>urn:sha1:f123cffb000987bfc04f2463cc33bae2b2c1d590</id>
<content type='text'>
Instead of relying that Sphinx will be called from Documentation/
dir, pick the location based on __file__.

Suggested-by: Jani Nikula &lt;jani.nikula@linux.intel.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
Message-ID: &lt;34c38718dfade91ff6f7afca5e9c1705ba253c97.1768838938.git.mchehab+huawei@kernel.org&gt;
</content>
</entry>
<entry>
<title>docs: conf.py: don't use doctree with a different meaning</title>
<updated>2026-01-23T18:37:38+00:00</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab+huawei@kernel.org</email>
</author>
<published>2026-01-19T16:23:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d0b31c30b58c07985c993fcc9275490948de87aa'/>
<id>urn:sha1:d0b31c30b58c07985c993fcc9275490948de87aa</id>
<content type='text'>
At Sphinx, doctree is a directory where doc build cache is stored.
Use a better name.

No functional changes.

Suggested-by: Jani Nikula &lt;jani.nikula@linux.intel.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
Message-ID: &lt;bab090bb4b95c735bd570c9c23c6e97851b2bf7b.1768838938.git.mchehab+huawei@kernel.org&gt;
</content>
</entry>
<entry>
<title>docs: conf.py: get rid of the now unused kerneldoc_bin env var</title>
<updated>2026-01-20T22:31:06+00:00</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab+huawei@kernel.org</email>
</author>
<published>2026-01-19T12:05:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0407f3714ce559bc0116b05a1b916321b832aca1'/>
<id>urn:sha1:0407f3714ce559bc0116b05a1b916321b832aca1</id>
<content type='text'>
In the past, this contained the location of the binary file to parse
kernel-doc. Nowadays, it is used only for debugging purposes, inside
kerneldoc.py extension.

Move it to sphinx/kerneldoc.py, to avoid needing to handle with it
on several places.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
Message-ID: &lt;c0fa9f561c1dd4370f9096de4195a9214763c51c.1768823489.git.mchehab+huawei@kernel.org&gt;
</content>
</entry>
<entry>
<title>docs: kdoc: move kernel-doc to tools/docs</title>
<updated>2026-01-20T22:31:06+00:00</updated>
<author>
<name>Jonathan Corbet</name>
<email>corbet@lwn.net</email>
</author>
<published>2026-01-19T12:05:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=eba6ffd126cd52358181ed5a179644a161f9c65f'/>
<id>urn:sha1:eba6ffd126cd52358181ed5a179644a161f9c65f</id>
<content type='text'>
kernel-doc is the last documentation-related tool still living outside of
the tools/docs directory; the time has come to move it over.

[mchehab: fixed kdoc lib location]

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
Message-ID: &lt;311d17e403524349940a8b12de6b5e91e554b1f4.1768823489.git.mchehab+huawei@kernel.org&gt;
</content>
</entry>
<entry>
<title>Documentation: Link man pages to https://man7.org/</title>
<updated>2026-01-16T18:19:06+00:00</updated>
<author>
<name>Petr Vorel</name>
<email>pvorel@suse.cz</email>
</author>
<published>2026-01-13T11:36:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9088a767e745ca6bc72cba565090f678c5934650'/>
<id>urn:sha1:9088a767e745ca6bc72cba565090f678c5934650</id>
<content type='text'>
Configure manpages_url to link man pages to https://man7.org/.
https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-manpages_url

Acked-by: Alejandro Colomar &lt;alx@kernel.org&gt;
Signed-off-by: Petr Vorel &lt;pvorel@suse.cz&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
Message-ID: &lt;20260113113612.315748-3-pvorel@suse.cz&gt;
</content>
</entry>
<entry>
<title>docs: conf.py: get rid of load_config.py</title>
<updated>2025-09-21T22:40:37+00:00</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab+huawei@kernel.org</email>
</author>
<published>2025-09-20T09:40:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=72603d73fae3d727fd1c97ab003940f1c2309226'/>
<id>urn:sha1:72603d73fae3d727fd1c97ab003940f1c2309226</id>
<content type='text'>
The code here was meant to handle 3 functions:
1. allow having a separate conf.py file, per subdir;
2. generate a list of latex documents.
3. set "subproject" tag if SPHINXDIRS points to a subdir.

We don't have (1) anymore, and (3) is now properly handled
entirely inside conf.py.

So, only (3) is still needed, and this is a single-line change
at conf.py.

So, drop it, moving the remaining code to conf.py.

While here, drop a duplicated $(RUSTDOC) command-line argument.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
Message-ID: &lt;ec998f9f268a401ca6aa36e3221d39c97efeccaa.1758361087.git.mchehab+huawei@kernel.org&gt;
</content>
</entry>
<entry>
<title>docs: conf.py: drop xindy rule</title>
<updated>2025-08-29T22:45:09+00:00</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab+huawei@kernel.org</email>
</author>
<published>2025-08-25T12:04:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d90e7b56406032a6175e79de3d7e884185f6be71'/>
<id>urn:sha1:d90e7b56406032a6175e79de3d7e884185f6be71</id>
<content type='text'>
The rule as-is is wrong, as it was inverted. Besides that, after
retest building all repos with suggested LaTeX packages given
by sphinx-pre-install, I was unable to reproduce the issues
I saw with xindy in the past.

So, let's just drop. If anyone reports issues with xindy, we
may need to readd, but at the right way, e.g. {options}{pkgname}.

Reported-by: Akira Yokosawa &lt;akiyks@gmail.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
Link: https://lore.kernel.org/r/83068bc31839e7095f1f408e49658362d467797e.1756123459.git.mchehab+huawei@kernel.org
</content>
</entry>
</feed>
