adapted doxygen config and markdown links to in source build of documentation

added cloning of doxygen theme
This commit is contained in:
Gulliver 2023-06-08 16:56:34 +02:00
parent 710efd292b
commit f6805296ae
10 changed files with 441 additions and 237 deletions

View File

@ -21,9 +21,15 @@ jobs:
- name: configure - name: configure
run: cmake -B build -S . -DEXPATPP_BUILD_DOCS=ON run: cmake -B build -S . -DEXPATPP_BUILD_DOCS=ON
- name: clean generated docs dir - name: clean generated docs dir
run: rm -rf build/html run: rm -rf site docs/reference
- name: build - name: clone dxygen theme
run: cmake --build build --target doc run: git clone https://github.com/CrowCpp/darxygen.git
- name: run doxygen
run: doxygen
- name: run mkdocs
run: mkdocs build
#- name: build
# run: cmake --build build --target doc
- name: Deploy 🚀 - name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4 uses: JamesIves/github-pages-deploy-action@v4

2
.gitignore vendored
View File

@ -1,3 +1,5 @@
darxygen/**
docs/reference/**
# Compiled Object files # Compiled Object files
*.slo *.slo
*.lo *.lo

638
Doxyfile

File diff suppressed because it is too large Load Diff

View File

@ -35,4 +35,4 @@ app.bindaddr("192.168.1.2")
<br><br> <br><br>
For more info on middlewares, check out [this page](../middleware).<br><br> For more info on middlewares, check out [this page](../middleware).<br><br>
For more info on what functions are available to a Crow app, go [here](../../reference/classcrow_1_1_crow.html). For more info on what functions are available to a Crow app, go [here](../reference/classcrow_1_1_crow.html).

View File

@ -88,9 +88,9 @@ Examples: `examples/middlewares/example_cors.cpp`
This middleware allows to set CORS policies by using `CORSHandler`. Once enabled, it will apply the default CORS rules globally. This middleware allows to set CORS policies by using `CORSHandler`. Once enabled, it will apply the default CORS rules globally.
The CORS rules can be modified by first getting the middleware via `#!cpp auto& cors = app.get_middleware<crow::CORSHandler>();`. The rules can be set per URL prefix using `prefix()`, per blueprint using `blueprint()`, or globally via `global()`. These will return a `CORSRules` object which contains the actual rules for the prefix, blueprint, or application. For more details go [here](../../reference/structcrow_1_1_c_o_r_s_handler.html). The CORS rules can be modified by first getting the middleware via `#!cpp auto& cors = app.get_middleware<crow::CORSHandler>();`. The rules can be set per URL prefix using `prefix()`, per blueprint using `blueprint()`, or globally via `global()`. These will return a `CORSRules` object which contains the actual rules for the prefix, blueprint, or application. For more details go [here](../reference/structcrow_1_1_c_o_r_s_handler.html).
`CORSRules` can be modified using the methods `origin()`, `methods()`, `headers()`, `max_age()`, `allow_credentials()`, or `ignore()`. For more details on these methods and what default values they take go [here](../../reference/structcrow_1_1_c_o_r_s_rules.html). `CORSRules` can be modified using the methods `origin()`, `methods()`, `headers()`, `max_age()`, `allow_credentials()`, or `ignore()`. For more details on these methods and what default values they take go [here](../reference/structcrow_1_1_c_o_r_s_rules.html).
```cpp ```cpp
auto& cors = app.get_middleware<crow::CORSHandler>(); auto& cors = app.get_middleware<crow::CORSHandler>();
@ -100,4 +100,4 @@ cors
.methods("POST"_method, "GET"_method) .methods("POST"_method, "GET"_method)
.prefix("/cors") .prefix("/cors")
.origin("example.com"); .origin("example.com");
``` ```

View File

@ -20,7 +20,7 @@ JSON read value, used for taking a JSON string and parsing it into `crow::json`.
You can read individual items of the rvalue, but you cannot add items to it.<br> You can read individual items of the rvalue, but you cannot add items to it.<br>
To do that, you need to convert it to a `wvalue`, which can be done by simply writing `#!cpp crow::json::wvalue wval (rval);` (assuming `rval` is your `rvalue`).<br><br> To do that, you need to convert it to a `wvalue`, which can be done by simply writing `#!cpp crow::json::wvalue wval (rval);` (assuming `rval` is your `rvalue`).<br><br>
For more info on read values go [here](../../reference/classcrow_1_1json_1_1rvalue.html).<br><br> For more info on read values go [here](../reference/classcrow_1_1json_1_1rvalue.html).<br><br>
## wvalue ## wvalue
JSON write value, used for creating, editing and converting JSON to a string.<br><br> JSON write value, used for creating, editing and converting JSON to a string.<br><br>
@ -43,7 +43,7 @@ An object type `wvalue` uses `std::unordered_map` by default, if you want to hav
A JSON `wvalue` can be returned directly inside a route handler, this will cause the `content-type` header to automatically be set to `Application/json` and the JSON value will be converted to string and placed in the response body. For more information go to [Routes](../routes).<br><br> A JSON `wvalue` can be returned directly inside a route handler, this will cause the `content-type` header to automatically be set to `Application/json` and the JSON value will be converted to string and placed in the response body. For more information go to [Routes](../routes).<br><br>
For more info on write values go [here](../../reference/classcrow_1_1json_1_1wvalue.html). For more info on write values go [here](../reference/classcrow_1_1json_1_1wvalue.html).
!!! note !!! note

View File

@ -29,4 +29,4 @@ Part headers are organized in a similar way to request and response headers, and
The message's individual body parts can be accessed by name using `msg.get_part_by_name("part-name")`.<br><br> The message's individual body parts can be accessed by name using `msg.get_part_by_name("part-name")`.<br><br>
For more info on Multipart messages, go [here](../../reference/namespacecrow_1_1multipart.html) For more info on Multipart messages, go [here](../reference/namespacecrow_1_1multipart.html)

View File

@ -36,4 +36,4 @@ Works the same as `get_dict` but removing the values from the query string.
if your query string contains both a list and dictionary with the same key, it is best to use `pop_list` before either `get_dict` or `pop_dict`, since a map cannot contain more than one value per key, each item in the list will override the previous and only the last will remain with an empty key. if your query string contains both a list and dictionary with the same key, it is best to use `pop_list` before either `get_dict` or `pop_dict`, since a map cannot contain more than one value per key, each item in the list will override the previous and only the last will remain with an empty key.
<br><br> <br><br>
For more information take a look [here](../../reference/classcrow_1_1query__string.html). For more information take a look [here](../reference/classcrow_1_1query__string.html).

View File

@ -88,7 +88,7 @@ You can also access the URL parameters in the handler using `#!cpp req.url_param
parameters inside the body can be parsed using `#!cpp req.get_body_params();`. which is useful for requests of type `application/x-www-form-urlencoded`. Its format is similar to `url_params`. parameters inside the body can be parsed using `#!cpp req.get_body_params();`. which is useful for requests of type `application/x-www-form-urlencoded`. Its format is similar to `url_params`.
For more information on `crow::request` go [here](../../reference/structcrow_1_1request.html).<br><br> For more information on `crow::request` go [here](../reference/structcrow_1_1request.html).<br><br>
### Response ### Response
Crow also provides the ability to define a response in the parameters by using `#!cpp ([](crow::response& res){...})`.<br><br> Crow also provides the ability to define a response in the parameters by using `#!cpp ([](crow::response& res){...})`.<br><br>
@ -97,7 +97,7 @@ Please note that in order to return a response defined as a parameter you'll nee
Alternatively, you can define the response in the body and return it (`#!cpp ([](){return crow::response()})`).<br> Alternatively, you can define the response in the body and return it (`#!cpp ([](){return crow::response()})`).<br>
For more information on `crow::response` go [here](../../reference/structcrow_1_1response.html).<br><br> For more information on `crow::response` go [here](../reference/structcrow_1_1response.html).<br><br>
Crow defines the following status codes: Crow defines the following status codes:
``` ```
@ -152,7 +152,7 @@ Crow defines the following status codes:
### Return statement ### Return statement
A `crow::response` is very strictly tied to a route. If you can have something in a response constructor, you can return it in a handler.<br><br> A `crow::response` is very strictly tied to a route. If you can have something in a response constructor, you can return it in a handler.<br><br>
The main return type is `std::string`, although you could also return a `crow::json::wvalue` or `crow::multipart::message` directly.<br><br> The main return type is `std::string`, although you could also return a `crow::json::wvalue` or `crow::multipart::message` directly.<br><br>
For more information on the specific constructors for a `crow::response` go [here](../../reference/structcrow_1_1response.html). For more information on the specific constructors for a `crow::response` go [here](../reference/structcrow_1_1response.html).
## Returning custom classes ## Returning custom classes
<span class="tag">[:octicons-feed-tag-16: v0.3](https://github.com/CrowCpp/Crow/releases/v0.3)</span> <span class="tag">[:octicons-feed-tag-16: v0.3](https://github.com/CrowCpp/Crow/releases/v0.3)</span>

View File

@ -47,6 +47,6 @@ The maximum payload size that a connection accepts can be adjusted either global
By default, This limit is disabled. To disable the global setting in specific routes, you only need to call `#!cpp CROW_WEBSOCKET_ROUTE(app, "/url").max_payload(UINT64_MAX)`. By default, This limit is disabled. To disable the global setting in specific routes, you only need to call `#!cpp CROW_WEBSOCKET_ROUTE(app, "/url").max_payload(UINT64_MAX)`.
For more info about websocket routes go [here](../../reference/classcrow_1_1_web_socket_rule.html). For more info about websocket routes go [here](../reference/classcrow_1_1_web_socket_rule.html).
For more info about websocket connections go [here](../../reference/classcrow_1_1websocket_1_1_connection.html). For more info about websocket connections go [here](../reference/classcrow_1_1websocket_1_1_connection.html).