doc: extensions: add kconfig directive and role support
Add a new extension to support the :kconfig: role and .. kconfig:: directive. This removes the need of using :option:. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
parent
98f879bad6
commit
21d01ad7d1
1 changed files with 27 additions and 0 deletions
27
doc/_extensions/zephyr/kconfig-role.py
Normal file
27
doc/_extensions/zephyr/kconfig-role.py
Normal file
|
@ -0,0 +1,27 @@
|
|||
"""
|
||||
Kconfig role and directive
|
||||
##########################
|
||||
|
||||
Copyright (c) 2021 Nordic Semiconductor ASA
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
Introduction
|
||||
============
|
||||
|
||||
A Sphinx extension that provides a role and directive for Kconfig content. The
|
||||
``:kconfig:`` role can be used inline to generate references to the page
|
||||
containing documentation for any Kconfig option. The ``.. kconfig::`` directive
|
||||
is automatically added to the Kconfig generated pages.
|
||||
|
||||
Copyright (c) 2021 Nordic Semiconductor ASA
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
"""
|
||||
|
||||
|
||||
def setup(app):
|
||||
app.add_crossref_type("kconfig", "kconfig")
|
||||
|
||||
return {
|
||||
"parallel_read_safe": True,
|
||||
"parallel_write_safe": True,
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue