Skip to content

Commit 074c6e2

Browse files
committed
Amend adding new rtypes procedure.
1 parent 38de2e1 commit 074c6e2

File tree

1 file changed

+4
-29
lines changed

1 file changed

+4
-29
lines changed

documentation/adding-new-rtypes.md

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -291,39 +291,14 @@ tests, please ask!
291291

292292
## Step 8: Write documentation
293293

294-
Add a new Markdown file to `documentation/functions/domain`. Copy an existing file (`CNAME.md` is a good example). The section between the lines of `---` is called the front matter and it has the following keys:
294+
Add a new Markdown file to `documentation/language_reference/domain_modifier_functions` (if the new record type is service provider specific, add it to the appropriate subfolder, creating the folder if it does not exist). Copy an existing file (`CNAME.md` is a good example). The section between the lines of `---` is called the front matter and it has the following keys:
295295

296296
- `name`: The name of the record. This should match the file name and the name of the record in `helpers.js`.
297297
- `parameters`: A list of parameter names, in order. Feel free to use spaces in the name if necessary. Your last parameter should be `modifiers...` to allow arbitrary modifiers like `TTL` to be applied to your record.
298298
- `parameter_types`: an object with parameter names as keys and TypeScript type names as values. Check out existing record documentation if you’re not sure to put for a parameter. Note that this isn’t displayed on the website, it’s only used to generate the `.d.ts` file.
299299

300300
The rest of the file is the documentation. You can use Markdown syntax to format the text.
301301

302-
Add the new file `FOO.md` to the documentation table of contents [`documentation/SUMMARY.md`](SUMMARY.md#domain-modifiers), and/or to the [`Service Provider specific`](SUMMARY.md#service-provider-specific) section if you made a record specific to a provider, and to the [`Record Modifiers`](SUMMARY.md#record-modifiers) section if you created any `*_BUILDER` or `*_HELPER` or similar functions for the new record type:
303-
304-
{% code title="documentation/SUMMARY.md" %}
305-
```diff
306-
...
307-
* Domain Modifiers
308-
...
309-
* [DnsProvider](language_reference/domain_modifier_functions/DnsProvider.md)
310-
+ * [FOO](language_reference/domain_modifier_functions/FOO.md)
311-
* [FRAME](language_reference/domain_modifier_functions/FRAME.md)
312-
...
313-
* Service Provider specific
314-
...
315-
* ClouDNS
316-
* [CLOUDNS_WR](language_reference/domain_modifier_functions/service_provider_specific/ClouDNS/CLOUDNS_WR.md)
317-
+ * ASDF
318-
+ * [NINJA_RECORD](language_reference/domain_modifier_functions/service_provider_specific/XYZ/FOO_NINJA.md)
319-
* NS1
320-
* [NS1_URLFWD](language_reference/domain_modifier_functions/service_provider_specific/NS1/NS1_URLFWD.md)
321-
...
322-
* Record Modifiers
323-
...
324-
* [DMARC_BUILDER](language_reference/record_modifier_functions/DMARC_BUILDER.md)
325-
+ * [FOO_HELPER](language_reference/record_modifier_functions/FOO_HELPER.md)
326-
* [SPF_BUILDER](language_reference/record_modifier_functions/SPF_BUILDER.md)
327-
...
328-
```
329-
{% endcode %}
302+
If you create any helper functions such as `FOO_BUILDER`, place the markdown files documenting them in their appropriate folder e.g. `documentation/language_reference/record_modifier_functions`.
303+
304+
At the next run of `go generate ./...` - the documentation tables and links within the new markdown files should be automatically generated and refreshed.

0 commit comments

Comments
 (0)