|
1 |
| -`gdnative-doc` allows for an optional `toml` configuration file. The current valid entries are : |
| 1 | +# Configuration file |
2 | 2 |
|
3 |
| -- `url_overrides: HashMap<String, String>`: |
4 |
| - List of items for which the linking url should be overriden. |
5 |
| -- `rename_classes: HashMap<String, String>`: |
6 |
| - Renaming of types when going from Rust to Godot. |
| 3 | +The behaviour of `gdnative-doc` can be configured via a [toml configuration file](https://toml.io/en/). |
7 | 4 |
|
8 |
| - This is useful because GDNative allows defining a `script_class_name` in the |
9 |
| - `.gdns` file. |
| 5 | +The current options are: |
10 | 6 |
|
11 |
| -- `markdown_options: Vec<String>`: |
12 |
| - Optional markdown options. |
| 7 | +- ## url_overrides |
13 | 8 |
|
14 |
| - ### Valid options |
| 9 | + Here you can specify a list of items for which the linking url should be overriden. |
| 10 | + |
| 11 | + ### Example |
| 12 | + |
| 13 | + ```toml |
| 14 | + # link `bool` to the latest documentation instead of stable. |
| 15 | + url_overrides = { bool = "https://docs.godotengine.org/en/latest/classes/class_bool.html" } |
| 16 | + ``` |
| 17 | + |
| 18 | +- ## rename_classes |
| 19 | + |
| 20 | + Here you can a list of structures that will be renamed. |
| 21 | + |
| 22 | + This is useful because GDNative allows defining a `script_class_name` in the `.gdns` file. |
| 23 | + |
| 24 | + ### Example |
| 25 | + |
| 26 | + ```rust |
| 27 | + // in lib.rs |
| 28 | + |
| 29 | + #[derive(NativeClass)] |
| 30 | + #[inherit(Reference)] |
| 31 | + /// My Rust interface |
| 32 | + pub struct RustStructure {} |
| 33 | + ``` |
| 34 | + |
| 35 | + ```toml |
| 36 | + rename_classes = { RustStructure = "GodotClass" } |
| 37 | + ``` |
| 38 | + |
| 39 | +- ## markdown_options |
| 40 | + |
| 41 | + List of optional markdown options. |
| 42 | + |
| 43 | +- ### Valid options |
15 | 44 |
|
16 | 45 | - FOOTNOTES
|
17 | 46 | - SMART_PUNCTUATION
|
|
23 | 52 |
|
24 | 53 | No option enabled.
|
25 | 54 |
|
26 |
| -- `opening_comment: bool`: |
27 |
| - Control whether or not to include commentary in the generated files. |
| 55 | + ### Example |
| 56 | + |
| 57 | + ```toml |
| 58 | + markdown_options = ["STRIKETHROUGH", "TABLES", "TASKLISTS"] |
| 59 | + ``` |
28 | 60 |
|
29 |
| - The commentary includes information such that the file was automatically |
30 |
| - generated, the name of the source file it originated from... |
| 61 | +- ## opening_comment |
| 62 | + |
| 63 | + Boolean that control whether or not to include a comment in the generated files. |
| 64 | + |
| 65 | + The comment includes information such that the file was automatically generated, the name of the source file it originated from... |
31 | 66 |
|
32 | 67 | ### Default
|
33 | 68 |
|
34 | 69 | `true`
|
| 70 | + |
| 71 | + ### Example |
| 72 | + |
| 73 | + ```toml |
| 74 | + opening_comment = false |
| 75 | + ``` |
0 commit comments