summaryrefslogtreecommitdiff
path: root/tools/net
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2023-11-28 20:14:27 -0800
committerJakub Kicinski <kuba@kernel.org>2023-11-30 23:17:53 -0800
commite8c780a5706066eba210e4c514968d95ba29e052 (patch)
tree440359f0ac55c7034d30a6436906a305586a69bf /tools/net
parent981239ee35bcc3c37055bb0023eb6685ab4073ac (diff)
docs: netlink: link to family documentations from spec info
To increase the chances of people finding the rendered docs add a link to specs.rst and index.rst. Add a label in the generated index.rst and while at it adjust the title a little bit. Reviewed-by: Breno Leitao <leitao@debian.org> Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Reviewed-by: Jiri Pirko <jiri@nvidia.com> Link: https://lore.kernel.org/r/20231129041427.2763074-1-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/net')
-rwxr-xr-xtools/net/ynl/ynl-gen-rst.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/net/ynl/ynl-gen-rst.py b/tools/net/ynl/ynl-gen-rst.py
index b6292109e236..8c62e040df5d 100755
--- a/tools/net/ynl/ynl-gen-rst.py
+++ b/tools/net/ynl/ynl-gen-rst.py
@@ -122,6 +122,11 @@ def rst_toctree(maxdepth: int = 2) -> str:
return "\n".join(lines)
+def rst_label(title: str) -> str:
+ """Return a formatted label"""
+ return f".. _{title}:\n\n"
+
+
# Parsers
# =======
@@ -349,7 +354,8 @@ def generate_main_index_rst(output: str) -> None:
lines = []
lines.append(rst_header())
- lines.append(rst_title("Netlink Specification"))
+ lines.append(rst_label("specs"))
+ lines.append(rst_title("Netlink Family Specifications"))
lines.append(rst_toctree(1))
index_dir = os.path.dirname(output)