Skip to content

Commit 3937f53

Browse files
committed
Minor doc improvements
1 parent e2d0ee6 commit 3937f53

3 files changed

Lines changed: 37 additions & 22 deletions

File tree

docs/cross-references.rst

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,15 @@
11
Cross-references
22
================
33

4-
.. role:: code-rst(code)
5-
:language: reStructuredText
6-
7-
.. rst:directive:: .. rdl:relative-to:: path
8-
9-
It can be cumbersome to always specify the full register hierarchy in your docs.
10-
This directive lets you temporarily set a more localized scope to a hierarchy
11-
to make following references in the same document easier to manage.
12-
13-
.. code-block:: rst
14-
15-
Annoying! :rdl:ref:`very.long.path.to.my_block.my_register`
16-
17-
.. rdl:relative-to:: very.long.path.to
18-
19-
Much better! :rdl:ref:`my_block.my_register`
20-
21-
22-
Cross-references will first search relative to the path specified, then
23-
fall back to searching the absolute path.
4+
PeakRDL cross-references allow you to insert links into your documentation that
5+
point to specific register model nodes. These are very useful in programming
6+
guides, or more long-form prose in documentation.
247

8+
Cross-references can link to inline register reference content, or dynamic HTML content.
259

2610

11+
.. role:: code-rst(code)
12+
:language: reStructuredText
2713

2814

2915
.. rst:role:: rdl:ref
@@ -46,7 +32,27 @@ Cross-references
4632
Same as the :rst:role:`rdl:ref` role, except this will prefer linking to
4733
PeakRDL-HTML reference, regardless of the :confval:`peakrdl_default_link_to` setting.
4834

35+
4936
.. rst:role:: rdl:doc-ref
5037
5138
Same as the :rst:role:`rdl:ref` role, except this will prefer linking to
5239
an inline :rst:dir:`docnode`, regardless of the :confval:`peakrdl_default_link_to` setting.
40+
41+
42+
.. rst:directive:: .. rdl:relative-to:: path
43+
44+
It can be cumbersome to always specify the full register hierarchy in your docs.
45+
This directive lets you temporarily set a more localized scope to a hierarchy
46+
to make following references in the same document easier to manage.
47+
48+
.. code-block:: rst
49+
50+
Annoying! :rdl:ref:`very.long.path.to.my_block.my_register`
51+
52+
.. rdl:relative-to:: very.long.path.to
53+
54+
Much better! :rdl:ref:`my_block.my_register`
55+
56+
57+
Cross-references will first search relative to the path specified, then
58+
fall back to searching the absolute path.

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Start cross-referencing!
5353
~~~~~~~~~~~~~~~~~~~~~~~~
5454
Cross-reference your documentation to automatically-generated PeakRDL-HTML pages.
5555

56-
This really useful when writing software guides or other reference pages. For example:
56+
This is really useful when writing software guides or other reference pages. For example:
5757

5858
.. code-block:: rst
5959

docs/inline-documentation.rst

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
Inline Documentation
22
====================
33

4+
Register reference can be inserted inline into any reStructuredText document
5+
using the directives described in this page.
6+
Inline register reference is useful if you do not want to rely on the dynamic
7+
HTML-generated register reference, and instead want to have all the register
8+
reference be included within the Sphinx-doc project. This is especially useful
9+
if the desired output is PDF.
10+
411
.. rst:directive:: .. rdl:docnode:: path
512
613
Inserts the full documentation for the register model node referenced by ``path``.
@@ -15,7 +22,9 @@ Inline Documentation
1522
1623
.. rst:directive:option:: no-wrap-section:
1724
18-
If set, suppresses creation of a section heading.
25+
If set, suppresses creation of a section heading. This is useful if you
26+
want to provide your own section heading fot this docnode.
27+
1928
If this option is not specified, behavior is determined by the
2029
:confval:`peakrdl_doc_wrap_section` setting.
2130

0 commit comments

Comments
 (0)