Skip to content

Commit

Permalink
Add documentation page for doxygenpage directive
Browse files Browse the repository at this point in the history
Add initial documentation with "doxygenpage" usage relying on previously
added xrefsect examples.

Signed-off-by: Fabio Utzig <[email protected]>
  • Loading branch information
utzig committed Nov 5, 2020
1 parent 8fd5e39 commit 33fe8d8
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
1 change: 1 addition & 0 deletions documentation/source/directives.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Directives & Config Variables
file
group
autofile
page

.. contents:: Table of Contents

Expand Down
63 changes: 63 additions & 0 deletions documentation/source/page.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@

.. _page-example:

doxygenpage Directive
=====================

This directive generates the appropriate output for the contents of a doxygen
page. A doxygen page is created for each "key" of every \xrefitem command used
for markup in the source comments. For more information check the
`doxygen documentation`_.

It takes the standard ``project`` and ``path`` options.

::

.. doxygenpage:: <page name>
:project: ...
:path: ...

Checkout the :ref:`doxygengroup documentation <page-example>` for more details
and to see it in action.

.. _doxygen documentation: https://www.doxygen.nl/manual/commands.html#cmdxrefitem

.. contents::


Basic Example
-------------

.. cpp:namespace:: @ex_page_basic

The plain ``doxygenpage`` directive will output the page name and description
and any variable entries which were defined to be part of this page (with an
\xrefitem usage).

.. code-block:: rst
.. doxygenpage:: xrefsample
:project: xrefsect
It produces this output:

.. doxygenpage:: xrefsample
:project: xrefsect


Failing Example
---------------

.. cpp:namespace:: @ex_page_failing

This intentionally fails:

.. code-block:: rst
.. doxygengroup:: madeuppage
:project: xrefsect
It produces the following warning message:

.. warning:: Cannot find file "madeuppage" in doxygen xml output for project
"xrefsect" from directory: ../../examples/specific/xrefsect/xml/

0 comments on commit 33fe8d8

Please sign in to comment.