Skip to content

Commit 2ce9086

Browse files
Doxygen configuration and fix examples for better documentation (#124)
* Updated the Doxygen Fenced Code Blocks from c++ to cpp in docs/intro-examples.md to ensure proper syntax highlighting for C++ code. * Updated the Doxyfile to include EXAMPLE_PATH = examples/, enabling the use of the \include special command in Doxygen. This allows example files, such as intro-1-hello-world.cpp, to be correctly referenced and displayed in the documentation. * added code example 2 with include
1 parent 97630d3 commit 2ce9086

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

docs/Doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -986,7 +986,7 @@ EXCLUDE_SYMBOLS = beman::*::detail, beman::*::detail::*
986986
# that contain example code fragments that are included (see the \include
987987
# command).
988988

989-
EXAMPLE_PATH =
989+
EXAMPLE_PATH = examples/
990990

991991
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
992992
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and

docs/intro-examples.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This page provides a series of examples showing how to use the
88
<details>
99
<summary>`"Hello, world"` - synchronous using asynchronous components</summary>
1010

11-
Code: [`examples/intro-1-hello-world.cpp`]()
11+
@include examples/intro-1-hello-world.cpp
1212

1313
The first example is a very complicated way to a version of `"Hello,
1414
world"`: it uses components for dealing with asynchronous work to
@@ -21,7 +21,7 @@ The componentes for `std::execution` are declared in the header
2121
cmponents in namespace `beman::execution` declared in the header
2222
`<beman/execution/execution.hpp>`:
2323

24-
```c++
24+
```cpp
2525
#include <beman/execution/execution.hpp>
2626
#include <iostream>
2727
#include <string>
@@ -40,7 +40,7 @@ to point out unusual parts like the use of custom components.
4040
4141
All interesting work happens in the `main` function:
4242
43-
```c++
43+
```cpp
4444
int main()
4545
{
4646
auto[result] = ex::sync_wait(
@@ -125,6 +125,6 @@ The components used in this example do all of that synchronously:
125125
<details>
126126
<summary>`"Hello, async"` - a simple asynchronous example</summary>
127127

128-
Code: [`examples/intro-2-hello-async.cpp`]()
128+
@include examples/intro-2-hello-async.cpp
129129

130130
</details>

0 commit comments

Comments
 (0)