Skip to content

Commit 4c56139

Browse files
committed
adapt id_requred
1 parent 33a06be commit 4c56139

File tree

5 files changed

+10
-5
lines changed

5 files changed

+10
-5
lines changed

docs/conf.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,8 @@
7979
html_context = {"repository": "useblocks/sphinx-codelinks"}
8080
html_css_files = ["furo.css"]
8181

82+
# Sphinx-Needs configuration
83+
needs_from_toml = "ubproject.toml"
84+
85+
# Src-trace configuration
8286
src_trace_config_from_toml = "./src_trace.toml"

docs/source/basics/quickstart.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ Example
4646
-------
4747

4848
.. src-trace:: dummy src
49+
:id: SRC_000
4950
:project: src
5051

5152
.. note:: **local-url** is not working on the website as it only supports local browse

docs/source/components/directive.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,14 @@ The ``src-trace`` directive can be used with the **file** option:
5252
.. code-block:: rst
5353
5454
.. src-trace:: dcdc demo_1
55+
:id: SRC_001
5556
:project: dcdc
5657
:file: ./charge/demo_1.cpp
5758
5859
The needs defined in source code are extracted and rendered to:
5960

6061
.. src-trace:: dcdc demo_1
62+
:id: SRC_001
6163
:project: dcdc
6264
:file: ./charge/demo_1.cpp
6365

@@ -66,12 +68,14 @@ The ``src-trace`` directive can be used with the **directory** option:
6668
.. code-block:: rst
6769
6870
.. src-trace:: dcdc charge
71+
:id: SRC_001
6972
:project: dcdc
7073
:directory: ./discharge
7174
7275
The needs defined in source code are extracted and rendered to:
7376

7477
.. src-trace:: dcdc charge
78+
:id: SRC_002
7579
:project: dcdc
7680
:directory: ./discharge
7781

docs/ubproject.toml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,3 @@ ignore = ["block.title_line"]
55

66
[needs]
77
id_required = true
8-
9-
[[needs.types]]
10-
directive = "my-req"
11-
title = "My Requirement"
12-
prefix = "M_"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.. src-trace:: dummy src
2+
:id: SRC_000
23
:project: src

0 commit comments

Comments
 (0)