1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

DOCS: Added GitBook code blocks syntax for dnsconfig.js. (#2149)

Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
This commit is contained in:
Jeffrey Cafferata
2023-03-13 21:30:21 +01:00
committed by GitHub
parent af99942a3e
commit 05be3b83ed
48 changed files with 148 additions and 5 deletions

View File

@ -12,6 +12,7 @@ the record will inherit the DNSControl global internal default of 300 seconds. S
NS records are currently a special case, and do not inherit from `DefaultTTL`. See [`NAMESERVER_TTL`](../domain/NAMESERVER_TTL.md) to set a default TTL for all NS records.
{% code title="dnsconfig.js" %}
```javascript
D('example.com', REGISTRAR, DnsProvider('R53'),
DefaultTTL("4h"),
@ -19,6 +20,7 @@ D('example.com', REGISTRAR, DnsProvider('R53'),
A('foo', '2.3.4.5', TTL(600)) // overrides default
);
```
{% endcode %}
The DefaultTTL duration is the same format as [`TTL`](../record/TTL.md), an integer number of seconds
or a string with a unit such as `'4d'`.