From c31064781f3a7af9e0aac0f66fe38428d67acde8 Mon Sep 17 00:00:00 2001 From: Jeffrey Cafferata Date: Tue, 9 Apr 2024 20:26:45 +0200 Subject: [PATCH] DOCS: Documentation directory structure (#2905) --- build/generate/featureMatrix.go | 26 ++-- build/generate/functionTypes.go | 14 +- commands/types/dnscontrol.d.ts | 54 +++---- commands/types/fetch.d.ts | 2 +- documentation/SUMMARY.md | 137 +++++++++--------- documentation/adding-new-rtypes.md | 28 ++-- documentation/code-tricks.md | 14 +- documentation/examples.md | 2 +- documentation/functions/record/R53_ZONE.md | 15 -- documentation/index.md | 2 +- .../domain-modifiers}/A.md | 2 +- .../domain-modifiers}/AAAA.md | 0 .../domain-modifiers}/AKAMAICDN.md | 0 .../domain-modifiers}/ALIAS.md | 0 .../domain-modifiers}/AUTODNSSEC_OFF.md | 0 .../domain-modifiers}/AUTODNSSEC_ON.md | 0 .../domain-modifiers}/AZURE_ALIAS.md | 0 .../domain-modifiers}/CAA.md | 0 .../domain-modifiers}/CAA_BUILDER.md | 2 +- .../domain-modifiers}/CF_REDIRECT.md | 0 .../domain-modifiers}/CF_TEMP_REDIRECT.md | 0 .../domain-modifiers}/CF_WORKER_ROUTE.md | 0 .../domain-modifiers}/CLOUDNS_WR.md | 0 .../domain-modifiers}/CNAME.md | 0 .../domain-modifiers}/DHCID.md | 0 .../DISABLE_IGNORE_SAFETY_CHECK.md | 2 +- .../domain-modifiers}/DMARC_BUILDER.md | 0 .../domain-modifiers}/DNAME.md | 0 .../domain-modifiers}/DS.md | 0 .../domain-modifiers}/DefaultTTL.md | 8 +- .../domain-modifiers}/DnsProvider.md | 2 +- .../domain-modifiers}/FRAME.md | 0 .../domain-modifiers}/IGNORE.md | 6 +- .../domain-modifiers}/IGNORE_NAME.md | 0 .../domain-modifiers}/IGNORE_TARGET.md | 0 .../domain-modifiers}/IMPORT_TRANSFORM.md | 0 .../domain-modifiers}/INCLUDE.md | 0 .../domain-modifiers}/LOC.md | 0 .../domain-modifiers}/LOC_BUILDER_DD.md | 0 .../domain-modifiers}/LOC_BUILDER_DMM_STR.md | 0 .../domain-modifiers}/LOC_BUILDER_DMS_STR.md | 0 .../domain-modifiers}/LOC_BUILDER_STR.md | 0 .../domain-modifiers}/M365_BUILDER.md | 0 .../domain-modifiers}/MX.md | 0 .../domain-modifiers}/NAMESERVER.md | 0 .../domain-modifiers}/NAMESERVER_TTL.md | 4 +- .../domain-modifiers}/NAPTR.md | 0 .../domain-modifiers}/NO_PURGE.md | 0 .../domain-modifiers}/NS.md | 0 .../domain-modifiers}/NS1_URLFWD.md | 0 .../domain-modifiers}/PTR.md | 2 +- .../domain-modifiers}/PURGE.md | 0 .../domain-modifiers}/R53_ALIAS.md | 4 +- .../domain-modifiers}/SOA.md | 0 .../domain-modifiers}/SPF_BUILDER.md | 0 .../domain-modifiers}/SRV.md | 0 .../domain-modifiers}/SSHFP.md | 0 .../domain-modifiers}/TLSA.md | 0 .../domain-modifiers}/TXT.md | 2 +- .../domain-modifiers}/URL.md | 0 .../domain-modifiers}/URL301.md | 0 .../R53_EVALUATE_TARGET_HEALTH.md | 2 +- .../record-modifiers/R53_ZONE.md | 15 ++ .../record-modifiers}/TTL.md | 2 +- .../top-level-functions}/D.md | 4 +- .../top-level-functions}/DEFAULTS.md | 2 +- .../top-level-functions}/DOMAIN_ELSEWHERE.md | 2 +- .../DOMAIN_ELSEWHERE_AUTO.md | 2 +- .../top-level-functions}/D_EXTEND.md | 2 +- .../top-level-functions}/FETCH.md | 0 .../top-level-functions}/IP.md | 0 .../top-level-functions}/NewDnsProvider.md | 0 .../top-level-functions}/NewRegistrar.md | 0 .../top-level-functions}/PANIC.md | 0 .../top-level-functions}/REV.md | 0 .../top-level-functions}/REVCOMPAT.md | 0 .../getConfiguredDomains.md | 0 .../top-level-functions}/require.md | 0 .../top-level-functions}/require_glob.md | 0 documentation/notifications.md | 2 +- documentation/providers.md | 4 +- documentation/providers/route53.md | 4 +- documentation/providers/transip.md | 2 +- documentation/styleguide-doc.md | 10 +- documentation/writing-providers.md | 2 +- pkg/js/parse_tests/030-dextenddoc.js | 2 +- 86 files changed, 192 insertions(+), 193 deletions(-) delete mode 100644 documentation/functions/record/R53_ZONE.md rename documentation/{functions/domain => language-reference/domain-modifiers}/A.md (93%) rename documentation/{functions/domain => language-reference/domain-modifiers}/AAAA.md (100%) rename documentation/{functions/domain => language-reference/domain-modifiers}/AKAMAICDN.md (100%) rename documentation/{functions/domain => language-reference/domain-modifiers}/ALIAS.md (100%) rename documentation/{functions/domain => language-reference/domain-modifiers}/AUTODNSSEC_OFF.md (100%) rename documentation/{functions/domain => language-reference/domain-modifiers}/AUTODNSSEC_ON.md (100%) rename documentation/{functions/domain => language-reference/domain-modifiers}/AZURE_ALIAS.md (100%) rename documentation/{functions/domain => language-reference/domain-modifiers}/CAA.md (100%) rename documentation/{functions/domain => language-reference/domain-modifiers}/CAA_BUILDER.md (95%) rename documentation/{functions/domain => language-reference/domain-modifiers}/CF_REDIRECT.md (100%) rename documentation/{functions/domain => language-reference/domain-modifiers}/CF_TEMP_REDIRECT.md (100%) rename documentation/{functions/domain => language-reference/domain-modifiers}/CF_WORKER_ROUTE.md (100%) rename documentation/{functions/domain => language-reference/domain-modifiers}/CLOUDNS_WR.md (100%) rename documentation/{functions/domain => language-reference/domain-modifiers}/CNAME.md (100%) rename documentation/{functions/domain => language-reference/domain-modifiers}/DHCID.md (100%) rename documentation/{functions/domain => language-reference/domain-modifiers}/DISABLE_IGNORE_SAFETY_CHECK.md (88%) rename documentation/{functions/domain => language-reference/domain-modifiers}/DMARC_BUILDER.md (100%) rename documentation/{functions/domain => language-reference/domain-modifiers}/DNAME.md (100%) rename documentation/{functions/domain => language-reference/domain-modifiers}/DS.md (100%) rename documentation/{functions/domain => language-reference/domain-modifiers}/DefaultTTL.md (60%) rename documentation/{functions/domain => language-reference/domain-modifiers}/DnsProvider.md (94%) rename documentation/{functions/domain => language-reference/domain-modifiers}/FRAME.md (100%) rename documentation/{functions/domain => language-reference/domain-modifiers}/IGNORE.md (98%) rename documentation/{functions/domain => language-reference/domain-modifiers}/IGNORE_NAME.md (100%) rename documentation/{functions/domain => language-reference/domain-modifiers}/IGNORE_TARGET.md (100%) rename documentation/{functions/domain => language-reference/domain-modifiers}/IMPORT_TRANSFORM.md (100%) rename documentation/{functions/domain => language-reference/domain-modifiers}/INCLUDE.md (100%) rename documentation/{functions/domain => language-reference/domain-modifiers}/LOC.md (100%) rename documentation/{functions/domain => language-reference/domain-modifiers}/LOC_BUILDER_DD.md (100%) rename documentation/{functions/domain => language-reference/domain-modifiers}/LOC_BUILDER_DMM_STR.md (100%) rename documentation/{functions/domain => language-reference/domain-modifiers}/LOC_BUILDER_DMS_STR.md (100%) rename documentation/{functions/domain => language-reference/domain-modifiers}/LOC_BUILDER_STR.md (100%) rename documentation/{functions/domain => language-reference/domain-modifiers}/M365_BUILDER.md (100%) rename documentation/{functions/domain => language-reference/domain-modifiers}/MX.md (100%) rename documentation/{functions/domain => language-reference/domain-modifiers}/NAMESERVER.md (100%) rename documentation/{functions/domain => language-reference/domain-modifiers}/NAMESERVER_TTL.md (88%) rename documentation/{functions/domain => language-reference/domain-modifiers}/NAPTR.md (100%) rename documentation/{functions/domain => language-reference/domain-modifiers}/NO_PURGE.md (100%) rename documentation/{functions/domain => language-reference/domain-modifiers}/NS.md (100%) rename documentation/{functions/domain => language-reference/domain-modifiers}/NS1_URLFWD.md (100%) rename documentation/{functions/domain => language-reference/domain-modifiers}/PTR.md (98%) rename documentation/{functions/domain => language-reference/domain-modifiers}/PURGE.md (100%) rename documentation/{functions/domain => language-reference/domain-modifiers}/R53_ALIAS.md (97%) rename documentation/{functions/domain => language-reference/domain-modifiers}/SOA.md (100%) rename documentation/{functions/domain => language-reference/domain-modifiers}/SPF_BUILDER.md (100%) rename documentation/{functions/domain => language-reference/domain-modifiers}/SRV.md (100%) rename documentation/{functions/domain => language-reference/domain-modifiers}/SSHFP.md (100%) rename documentation/{functions/domain => language-reference/domain-modifiers}/TLSA.md (100%) rename documentation/{functions/domain => language-reference/domain-modifiers}/TXT.md (98%) rename documentation/{functions/domain => language-reference/domain-modifiers}/URL.md (100%) rename documentation/{functions/domain => language-reference/domain-modifiers}/URL301.md (100%) rename documentation/{functions/record => language-reference/record-modifiers}/R53_EVALUATE_TARGET_HEALTH.md (57%) create mode 100644 documentation/language-reference/record-modifiers/R53_ZONE.md rename documentation/{functions/record => language-reference/record-modifiers}/TTL.md (93%) rename documentation/{functions/global => language-reference/top-level-functions}/D.md (94%) rename documentation/{functions/global => language-reference/top-level-functions}/DEFAULTS.md (92%) rename documentation/{functions/global => language-reference/top-level-functions}/DOMAIN_ELSEWHERE.md (92%) rename documentation/{functions/global => language-reference/top-level-functions}/DOMAIN_ELSEWHERE_AUTO.md (92%) rename documentation/{functions/global => language-reference/top-level-functions}/D_EXTEND.md (96%) rename documentation/{functions/global => language-reference/top-level-functions}/FETCH.md (100%) rename documentation/{functions/global => language-reference/top-level-functions}/IP.md (100%) rename documentation/{functions/global => language-reference/top-level-functions}/NewDnsProvider.md (100%) rename documentation/{functions/global => language-reference/top-level-functions}/NewRegistrar.md (100%) rename documentation/{functions/global => language-reference/top-level-functions}/PANIC.md (100%) rename documentation/{functions/global => language-reference/top-level-functions}/REV.md (100%) rename documentation/{functions/global => language-reference/top-level-functions}/REVCOMPAT.md (100%) rename documentation/{functions/global => language-reference/top-level-functions}/getConfiguredDomains.md (100%) rename documentation/{functions/global => language-reference/top-level-functions}/require.md (100%) rename documentation/{functions/global => language-reference/top-level-functions}/require_glob.md (100%) diff --git a/build/generate/featureMatrix.go b/build/generate/featureMatrix.go index 730fe7a44..f23d05a4a 100644 --- a/build/generate/featureMatrix.go +++ b/build/generate/featureMatrix.go @@ -77,19 +77,19 @@ func matrixData() *FeatureMatrix { ProviderDNSProvider = "DNS Provider" ProviderRegistrar = "Registrar" ProviderThreadSafe = "Concurrency Verified" - DomainModifierAlias = "[`ALIAS`](functions/domain/ALIAS.md)" - DomainModifierCaa = "[`CAA`](functions/domain/CAA.md)" - DomainModifierDnssec = "[`AUTODNSSEC`](functions/domain/AUTODNSSEC_ON.md)" - DomainModifierLoc = "[`LOC`](functions/domain/LOC.md)" - DomainModifierNaptr = "[`NAPTR`](functions/domain/NAPTR.md)" - DomainModifierPtr = "[`PTR`](functions/domain/PTR.md)" - DomainModifierSoa = "[`SOA`](functions/domain/SOA.md)" - DomainModifierSrv = "[`SRV`](functions/domain/SRV.md)" - DomainModifierSshfp = "[`SSHFP`](functions/domain/SSHFP.md)" - DomainModifierTlsa = "[`TLSA`](functions/domain/TLSA.md)" - DomainModifierDs = "[`DS`](functions/domain/DS.md)" - DomainModifierDhcid = "[`DHCID`](functions/domain/DHCID.md)" - DomainModifierDname = "[`DNAME`](functions/domain/DNAME.md)" + DomainModifierAlias = "[`ALIAS`](language-reference/domain-modifiers/ALIAS.md)" + DomainModifierCaa = "[`CAA`](language-reference/domain-modifiers/CAA.md)" + DomainModifierDnssec = "[`AUTODNSSEC`](language-reference/domain-modifiers/AUTODNSSEC_ON.md)" + DomainModifierLoc = "[`LOC`](language-reference/domain-modifiers/LOC.md)" + DomainModifierNaptr = "[`NAPTR`](language-reference/domain-modifiers/NAPTR.md)" + DomainModifierPtr = "[`PTR`](language-reference/domain-modifiers/PTR.md)" + DomainModifierSoa = "[`SOA`](language-reference/domain-modifiers/SOA.md)" + DomainModifierSrv = "[`SRV`](language-reference/domain-modifiers/SRV.md)" + DomainModifierSshfp = "[`SSHFP`](language-reference/domain-modifiers/SSHFP.md)" + DomainModifierTlsa = "[`TLSA`](language-reference/domain-modifiers/TLSA.md)" + DomainModifierDs = "[`DS`](language-reference/domain-modifiers/DS.md)" + DomainModifierDhcid = "[`DHCID`](language-reference/domain-modifiers/DHCID.md)" + DomainModifierDname = "[`DNAME`](language-reference/domain-modifiers/DNAME.md)" DualHost = "dual host" CreateDomains = "create-domains" GetZones = "get-zones" diff --git a/build/generate/functionTypes.go b/build/generate/functionTypes.go index 62b2d68a8..65194f2fa 100644 --- a/build/generate/functionTypes.go +++ b/build/generate/functionTypes.go @@ -78,15 +78,15 @@ func parseFrontMatter(content string) (map[string]interface{}, string, error) { } var returnTypes = map[string]string{ - "domain": "DomainModifier", - "global": "void", - "record": "RecordModifier", + "domain-modifiers": "DomainModifier", + "top-level-functions": "void", + "record-modifiers": "RecordModifier", } var categories = map[string]string{ - "domain": "domain-modifiers", - "global": "top-level-functions", - "record": "record-modifiers", + "domain-modifiers": "domain-modifiers", + "top-level-functions": "top-level-functions", + "record-modifiers": "record-modifiers", } var providerNames = map[string]string{ @@ -101,7 +101,7 @@ var providerNames = map[string]string{ func generateFunctionTypes() (string, error) { funcs := []Function{} - srcRoot := join("documentation", "functions") + srcRoot := join("documentation", "language-reference") types, err := os.ReadDir(srcRoot) if err != nil { return "", err diff --git a/commands/types/dnscontrol.d.ts b/commands/types/dnscontrol.d.ts index e8ed36bbd..52d7cfdde 100644 --- a/commands/types/dnscontrol.d.ts +++ b/commands/types/dnscontrol.d.ts @@ -180,7 +180,7 @@ declare const DISABLE_REPEATED_DOMAIN_CHECK: RecordModifier; /** * A adds an A record To a domain. The name should be the relative label for the record. Use `@` for the domain apex. * - * The address should be an ip address, either a string, or a numeric value obtained via [IP](../global/IP.md). + * The address should be an ip address, either a string, or a numeric value obtained via [IP](../top-level-functions/IP.md). * * Modifiers can be any number of [record modifiers](https://docs.dnscontrol.org/language-reference/record-modifiers) or JSON objects, which will be merged into the record's metadata. * @@ -371,7 +371,7 @@ declare function CAA(name: string, tag: "issue" | "issuewild" | "iodef", value: /** * DNSControl contains a `CAA_BUILDER` which can be used to simply create - * [`CAA()`](../domain/CAA.md) records for your domains. Instead of creating each [`CAA()`](../domain/CAA.md) record + * [`CAA()`](../domain-modifiers/CAA.md) records for your domains. Instead of creating each [`CAA()`](../domain-modifiers/CAA.md) record * individually, you can simply configure your report mail address, the * authorized certificate authorities and the builder cares about the rest. * @@ -570,11 +570,11 @@ declare function CNAME(name: string, target: string, ...modifiers: RecordModifie /** * `D` adds a new Domain for DNSControl to manage. The first two arguments are required: the domain name (fully qualified `example.com` without a trailing dot), and the * name of the registrar (as previously declared with [NewRegistrar](NewRegistrar.md)). Any number of additional arguments may be included to add DNS Providers with [DNSProvider](NewDnsProvider.md), - * add records with [A](../domain/A.md), [CNAME](../domain/CNAME.md), and so forth, or add metadata. + * add records with [A](../domain-modifiers/A.md), [CNAME](../domain-modifiers/CNAME.md), and so forth, or add metadata. * * Modifier arguments are processed according to type as follows: * - * - A function argument will be called with the domain object as it's only argument. Most of the [built-in modifier functions](https://docs.dnscontrol.org/language-reference/domain-modifiers) return such functions. + * - A function argument will be called with the domain object as it's only argument. Most of the [built-in modifier functions](https://docs.dnscontrol.org/language-reference/domain-modifiers-modifiers) return such functions. * - An object argument will be merged into the domain's metadata collection. * - An array argument will have all of it's members evaluated recursively. This allows you to combine multiple common records or modifiers into a variable that can * be used like a macro in multiple domains. @@ -660,7 +660,7 @@ declare function D(name: string, registrar: string, ...modifiers: DomainModifier * * ## Example * - * We want to create backup zone files for all domains, but not actually register them. Also create a [`DefaultTTL`](../domain/DefaultTTL.md). + * We want to create backup zone files for all domains, but not actually register them. Also create a [`DefaultTTL`](../domain-modifiers/DefaultTTL.md). * The domain `example.com` will have the defaults set. * * ```javascript @@ -713,7 +713,7 @@ declare function DHCID(name: string, digest: string, ...modifiers: RecordModifie * It replaces the per-record `IGNORE_NAME_DISABLE_SAFETY_CHECK()` which is * deprecated as of DNSControl v4.0.0.0. * - * See [`IGNORE()`](../domain/IGNORE.md) for more information. + * See [`IGNORE()`](../domain-modifiers/IGNORE.md) for more information. * * ## Syntax * @@ -861,7 +861,7 @@ declare function DNAME(name: string, target: string, ...modifiers: RecordModifie * ); * ``` * - * NOTE: The [`NO_PURGE`](../domain/NO_PURGE.md) is used out of abundance of caution but since no + * NOTE: The [`NO_PURGE`](../domain-modifiers/NO_PURGE.md) is used out of abundance of caution but since no * `DnsProvider()` statements exist, no updates would be performed. * * @see https://docs.dnscontrol.org/language-reference/top-level-functions/domain_elsewhere @@ -896,7 +896,7 @@ declare function DOMAIN_ELSEWHERE(name: string, registrar: string, nameserver_na * ); * ``` * - * NOTE: The [`NO_PURGE`](../domain/NO_PURGE.md) is used to prevent DNSControl from changing the records. + * NOTE: The [`NO_PURGE`](../domain-modifiers/NO_PURGE.md) is used to prevent DNSControl from changing the records. * * @see https://docs.dnscontrol.org/language-reference/top-level-functions/domain_elsewhere_auto */ @@ -945,7 +945,7 @@ declare function DS(name: string, keytag: number, algorithm: number, digesttype: * not `domain.tld`. * * Some operators only act on an apex domain (e.g. - * [`CF_REDIRECT`](../domain/CF_REDIRECT.md) and [`CF_TEMP_REDIRECT`](../domain/CF_TEMP_REDIRECT.md)). Using them + * [`CF_REDIRECT`](../domain-modifiers/CF_REDIRECT.md) and [`CF_TEMP_REDIRECT`](../domain-modifiers/CF_TEMP_REDIRECT.md)). Using them * in a `D_EXTEND` subdomain may not be what you expect. * * ```javascript @@ -1007,10 +1007,10 @@ declare function DS(name: string, keytag: number, algorithm: number, digesttype: declare function D_EXTEND(name: string, ...modifiers: DomainModifier[]): void; /** - * DefaultTTL sets the TTL for all subsequent records following it in a domain that do not explicitly set one with [`TTL`](../record/TTL.md). If neither `DefaultTTL` or `TTL` exist for a record, - * the record will inherit the DNSControl global internal default of 300 seconds. See also [`DEFAULTS`](../global/DEFAULTS.md) to override the internal defaults. + * DefaultTTL sets the TTL for all subsequent records following it in a domain that do not explicitly set one with [`TTL`](../record-modifiers/TTL.md). If neither `DefaultTTL` or `TTL` exist for a record, + * the record will inherit the DNSControl global internal default of 300 seconds. See also [`DEFAULTS`](../top-level-functions/DEFAULTS.md) to override the internal defaults. * - * 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. + * NS records are currently a special case, and do not inherit from `DefaultTTL`. See [`NAMESERVER_TTL`](../domain-modifiers/NAMESERVER_TTL.md) to set a default TTL for all NS records. * * ```javascript * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), @@ -1020,7 +1020,7 @@ declare function D_EXTEND(name: string, ...modifiers: DomainModifier[]): void; * ); * ``` * - * The DefaultTTL duration is the same format as [`TTL`](../record/TTL.md), an integer number of seconds + * The DefaultTTL duration is the same format as [`TTL`](../record-modifiers/TTL.md), an integer number of seconds * or a string with a unit such as `"4d"`. * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/defaultttl @@ -1029,7 +1029,7 @@ declare function DefaultTTL(ttl: Duration): DomainModifier; /** * DnsProvider indicates that the specified provider should be used to manage - * records for this domain. The name must match the name used with [NewDnsProvider](../global/NewDnsProvider.md). + * records for this domain. The name must match the name used with [NewDnsProvider](../top-level-functions/NewDnsProvider.md). * * The nsCount parameter determines how the nameservers will be managed from this provider. * @@ -1075,11 +1075,11 @@ declare function FRAME(name: string, target: string, ...modifiers: RecordModifie * * Technically `IGNORE_NAME` is a promise that DNSControl will not modify or * delete existing records that match particular patterns. It is like - * [`NO_PURGE`](../domain/NO_PURGE.md) that matches only specific records. + * [`NO_PURGE`](../domain-modifiers/NO_PURGE.md) that matches only specific records. * * Including a record that is ignored is considered an error and may have * undefined behavior. This safety check can be disabled using the - * [`DISABLE_IGNORE_SAFETY_CHECK`](../domain/DISABLE_IGNORE_SAFETY_CHECK.md) feature. + * [`DISABLE_IGNORE_SAFETY_CHECK`](../domain-modifiers/DISABLE_IGNORE_SAFETY_CHECK.md) feature. * * ## Syntax * @@ -1815,7 +1815,7 @@ declare function NAMESERVER(name: string, ...modifiers: RecordModifier[]): Domai /** * NAMESERVER_TTL sets the TTL on the domain apex NS RRs defined by [`NAMESERVER`](NAMESERVER.md). * - * The value can be an integer or a string. See [`TTL`](../record/TTL.md) for examples. + * The value can be an integer or a string. See [`TTL`](../record-modifiers/TTL.md) for examples. * * ```javascript * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), @@ -1837,7 +1837,7 @@ declare function NAMESERVER(name: string, ...modifiers: RecordModifier[]): Domai * ); * ``` * - * To apply a default TTL to all other record types, see [`DefaultTTL`](../domain/DefaultTTL.md) + * To apply a default TTL to all other record types, see [`DefaultTTL`](../domain-modifiers/DefaultTTL.md) * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/nameserver_ttl */ @@ -2250,7 +2250,7 @@ declare function PANIC(message: string): never; * * `PTR("4.3", ...` // Assuming the domain is `2.1.in-addr.arpa` * * All magic is RFC2317-aware. We use the first format listed in the - * RFC for both [`REV()`](../global/REV.md) and `PTR()`. The format is + * RFC for both [`REV()`](../top-level-functions/REV.md) and `PTR()`. The format is * `FIRST/MASK.C.B.A.in-addr.arpa` where `FIRST` is the first IP address * of the zone, `MASK` is the netmask of the zone (25-31 inclusive), * and A, B, C are the first 3 octets of the IP address. For example @@ -2371,7 +2371,7 @@ declare const PURGE: DomainModifier; * * _S3 bucket_ (configured as website): specify the domain name of the Amazon S3 website endpoint in which you configured the bucket (for instance s3-website-us-east-2.amazonaws.com). For the available values refer to the [Amazon S3 Website Endpoints](https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region). * * _Another Route53 record_: specify the value of the name of another record in the same hosted zone. * - * For all the target type, excluding 'another record', you have to specify the `Zone ID` of the target. This is done by using the [`R53_ZONE`](../record/R53_ZONE.md) record modifier. + * For all the target type, excluding 'another record', you have to specify the `Zone ID` of the target. This is done by using the [`R53_ZONE`](../record-modifiers/R53_ZONE.md) record modifier. * * The zone id can be found depending on the target type: * @@ -2381,7 +2381,7 @@ declare const PURGE: DomainModifier; * * _S3 bucket_ (configured as website): specify the hosted zone ID for the region that you created the bucket in. You can find it in [the List of regions and hosted Zone IDs](https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region) * * _Another Route 53 record_: you can either specify the correct zone id or do not specify anything and DNSControl will figure out the right zone id. (Note: Route53 alias can't reference a record in a different zone). * - * Target health evaluation can be enabled with the [`R53_EVALUATE_TARGET_HEALTH`](../record/R53\_EVALUATE\_TARGET\_HEALTH.md) record modifier. + * Target health evaluation can be enabled with the [`R53_EVALUATE_TARGET_HEALTH`](../record-modifiers/R53\_EVALUATE\_TARGET\_HEALTH.md) record modifier. * * ```javascript * D("example.com", REG_MY_PROVIDER, DnsProvider("ROUTE53"), @@ -2398,18 +2398,18 @@ declare const PURGE: DomainModifier; declare function R53_ALIAS(name: string, target: string, zone_idModifier: DomainModifier & RecordModifier, evaluatetargethealthModifier: RecordModifier): DomainModifier; /** - * `R53_EVALUATE_TARGET_HEALTH` lets you enable target health evaluation for a [`R53_ALIAS()`](../domain/R53_ALIAS.md) record. Omitting `R53_EVALUATE_TARGET_HEALTH()` from `R53_ALIAS()` set the behavior to false. + * `R53_EVALUATE_TARGET_HEALTH` lets you enable target health evaluation for a [`R53_ALIAS()`](../domain-modifiers/R53_ALIAS.md) record. Omitting `R53_EVALUATE_TARGET_HEALTH()` from `R53_ALIAS()` set the behavior to false. * * @see https://docs.dnscontrol.org/language-reference/record-modifiers/service-provider-specific/amazon-route-53/r53_evaluate_target_health */ declare function R53_EVALUATE_TARGET_HEALTH(enabled: boolean): RecordModifier; /** - * `R53_ZONE` lets you specify the AWS Zone ID for an entire domain ([`D()`](../global/D.md)) or a specific [`R53_ALIAS()`](../domain/R53_ALIAS.md) record. + * `R53_ZONE` lets you specify the AWS Zone ID for an entire domain ([`D()`](../top-level-functions/D.md)) or a specific [`R53_ALIAS()`](../domain-modifiers/R53_ALIAS.md) record. * - * When used with [`D()`](../global/D.md), it sets the zone id of the domain. This can be used to differentiate between split horizon domains in public and private zones. See this [example](../../providers/route53.md#split-horizon) in the [Amazon Route 53 provider page](../../providers/route53.md). + * When used with [`D()`](../top-level-functions/D.md), it sets the zone id of the domain. This can be used to differentiate between split horizon domains in public and private zones. See this [example](../../providers/route53.md#split-horizon) in the [Amazon Route 53 provider page](../../providers/route53.md). * - * When used with [`R53_ALIAS()`](../domain/R53_ALIAS.md) it sets the required Route53 hosted zone id in a R53_ALIAS record. See [`R53_ALIAS()`](../domain/R53_ALIAS.md) documentation for details. + * When used with [`R53_ALIAS()`](../domain-modifiers/R53_ALIAS.md) it sets the required Route53 hosted zone id in a R53_ALIAS record. See [`R53_ALIAS()`](../domain-modifiers/R53_ALIAS.md) documentation for details. * * @see https://docs.dnscontrol.org/language-reference/record-modifiers/service-provider-specific/amazon-route-53/r53_zone */ @@ -2906,7 +2906,7 @@ declare function TLSA(name: string, usage: number, selector: number, type: numbe /** * TTL sets the TTL for a single record only. This will take precedence - * over the domain's [DefaultTTL](../domain/DefaultTTL.md) if supplied. + * over the domain's [DefaultTTL](../domain-modifiers/DefaultTTL.md) if supplied. * * The value can be: * @@ -3010,7 +3010,7 @@ declare function TTL(ttl: Duration): RecordModifier; * * #### How can you tell if a provider will support a particular `TXT()` record? * - * Include the `TXT()` record in a [`D()`](../global/D.md) as usual, along + * Include the `TXT()` record in a [`D()`](../top-level-functions/D.md) as usual, along * with the `DnsProvider()` for that provider. Run `dnscontrol check` to * see if any errors are produced. The check command does not talk to * the provider's API, thus permitting you to do this without having an diff --git a/commands/types/fetch.d.ts b/commands/types/fetch.d.ts index bf34ddab7..11dff1a27 100644 --- a/commands/types/fetch.d.ts +++ b/commands/types/fetch.d.ts @@ -1,5 +1,5 @@ /** - * @dnscontrol-auto-doc-comment functions/global/FETCH.md + * @dnscontrol-auto-doc-comment language-reference/top-level-functions/FETCH.md */ declare function FETCH( url: string, diff --git a/documentation/SUMMARY.md b/documentation/SUMMARY.md index abb634f69..5c704ded3 100644 --- a/documentation/SUMMARY.md +++ b/documentation/SUMMARY.md @@ -13,86 +13,85 @@ * [JavaScript DSL](js.md) * Top Level Functions - * [D](functions/global/D.md) - * [DEFAULTS](functions/global/DEFAULTS.md) - * [DOMAIN_ELSEWHERE](functions/global/DOMAIN_ELSEWHERE.md) - * [DOMAIN_ELSEWHERE_AUTO](functions/global/DOMAIN_ELSEWHERE_AUTO.md) - * [D_EXTEND](functions/global/D_EXTEND.md) - * [FETCH](functions/global/FETCH.md) - * [IP](functions/global/IP.md) - * [NewDnsProvider](functions/global/NewDnsProvider.md) - * [NewRegistrar](functions/global/NewRegistrar.md) - * [PANIC](functions/global/PANIC.md) - * [REV](functions/global/REV.md) - * [REVCOMPAT](functions/global/REVCOMPAT.md) - * [getConfiguredDomains](functions/global/getConfiguredDomains.md) - * [require](functions/global/require.md) - * [require_glob](functions/global/require_glob.md) + * [D](language-reference/top-level-functions/D.md) + * [DEFAULTS](language-reference/top-level-functions/DEFAULTS.md) + * [DOMAIN_ELSEWHERE](language-reference/top-level-functions/DOMAIN_ELSEWHERE.md) + * [DOMAIN_ELSEWHERE_AUTO](language-reference/top-level-functions/DOMAIN_ELSEWHERE_AUTO.md) + * [D_EXTEND](language-reference/top-level-functions/D_EXTEND.md) + * [FETCH](language-reference/top-level-functions/FETCH.md) + * [IP](language-reference/top-level-functions/IP.md) + * [NewDnsProvider](language-reference/top-level-functions/NewDnsProvider.md) + * [NewRegistrar](language-reference/top-level-functions/NewRegistrar.md) + * [PANIC](language-reference/top-level-functions/PANIC.md) + * [REV](language-reference/top-level-functions/REV.md) + * [getConfiguredDomains](language-reference/top-level-functions/getConfiguredDomains.md) + * [require](language-reference/top-level-functions/require.md) + * [require_glob](language-reference/top-level-functions/require_glob.md) * Domain Modifiers - * [A](functions/domain/A.md) - * [AAAA](functions/domain/AAAA.md) - * [ALIAS](functions/domain/ALIAS.md) - * [AUTODNSSEC_OFF](functions/domain/AUTODNSSEC_OFF.md) - * [AUTODNSSEC_ON](functions/domain/AUTODNSSEC_ON.md) - * [CAA](functions/domain/CAA.md) - * [CAA_BUILDER](functions/domain/CAA_BUILDER.md) - * [CNAME](functions/domain/CNAME.md) - * [DHCID](functions/domain/DHCID.md) - * [DNAME](functions/domain/DNAME.md) - * [DISABLE_IGNORE_SAFETY_CHECK](functions/domain/DISABLE_IGNORE_SAFETY_CHECK.md) - * [DMARC_BUILDER](functions/domain/DMARC_BUILDER.md) - * [DS](functions/domain/DS.md) - * [DefaultTTL](functions/domain/DefaultTTL.md) - * [DnsProvider](functions/domain/DnsProvider.md) - * [FRAME](functions/domain/FRAME.md) - * [IGNORE](functions/domain/IGNORE.md) - * [IGNORE_NAME](functions/domain/IGNORE_NAME.md) - * [IGNORE_TARGET](functions/domain/IGNORE_TARGET.md) - * [IMPORT_TRANSFORM](functions/domain/IMPORT_TRANSFORM.md) - * [INCLUDE](functions/domain/INCLUDE.md) - * [LOC](functions/domain/LOC.md) - * [LOC_BUILDER_DD](functions/domain/LOC_BUILDER_DD.md) - * [LOC_BUILDER_DMM_STR](functions/domain/LOC_BUILDER_DMM_STR.md) - * [LOC_BUILDER_DMS_STR](functions/domain/LOC_BUILDER_DMS_STR.md) - * [LOC_BUILDER_STR](functions/domain/LOC_BUILDER_STR.md) - * [M365_BUILDER](functions/domain/M365_BUILDER.md) - * [MX](functions/domain/MX.md) - * [NAMESERVER](functions/domain/NAMESERVER.md) - * [NAMESERVER_TTL](functions/domain/NAMESERVER_TTL.md) - * [NAPTR](functions/domain/NAPTR.md) - * [NO_PURGE](functions/domain/NO_PURGE.md) - * [NS](functions/domain/NS.md) - * [PTR](functions/domain/PTR.md) - * [PURGE](functions/domain/PURGE.md) - * [SOA](functions/domain/SOA.md) - * [SPF_BUILDER](functions/domain/SPF_BUILDER.md) - * [SRV](functions/domain/SRV.md) - * [SSHFP](functions/domain/SSHFP.md) - * [TLSA](functions/domain/TLSA.md) - * [TXT](functions/domain/TXT.md) - * [URL](functions/domain/URL.md) - * [URL301](functions/domain/URL301.md) + * [A](language-reference/domain-modifiers/A.md) + * [AAAA](language-reference/domain-modifiers/AAAA.md) + * [ALIAS](language-reference/domain-modifiers/ALIAS.md) + * [AUTODNSSEC_OFF](language-reference/domain-modifiers/AUTODNSSEC_OFF.md) + * [AUTODNSSEC_ON](language-reference/domain-modifiers/AUTODNSSEC_ON.md) + * [CAA](language-reference/domain-modifiers/CAA.md) + * [CAA_BUILDER](language-reference/domain-modifiers/CAA_BUILDER.md) + * [CNAME](language-reference/domain-modifiers/CNAME.md) + * [DHCID](language-reference/domain-modifiers/DHCID.md) + * [DNAME](language-reference/domain-modifiers/DNAME.md) + * [DISABLE_IGNORE_SAFETY_CHECK](language-reference/domain-modifiers/DISABLE_IGNORE_SAFETY_CHECK.md) + * [DMARC_BUILDER](language-reference/domain-modifiers/DMARC_BUILDER.md) + * [DS](language-reference/domain-modifiers/DS.md) + * [DefaultTTL](language-reference/domain-modifiers/DefaultTTL.md) + * [DnsProvider](language-reference/domain-modifiers/DnsProvider.md) + * [FRAME](language-reference/domain-modifiers/FRAME.md) + * [IGNORE](language-reference/domain-modifiers/IGNORE.md) + * [IGNORE_NAME](language-reference/domain-modifiers/IGNORE_NAME.md) + * [IGNORE_TARGET](language-reference/domain-modifiers/IGNORE_TARGET.md) + * [IMPORT_TRANSFORM](language-reference/domain-modifiers/IMPORT_TRANSFORM.md) + * [INCLUDE](language-reference/domain-modifiers/INCLUDE.md) + * [LOC](language-reference/domain-modifiers/LOC.md) + * [LOC_BUILDER_DD](language-reference/domain-modifiers/LOC_BUILDER_DD.md) + * [LOC_BUILDER_DMM_STR](language-reference/domain-modifiers/LOC_BUILDER_DMM_STR.md) + * [LOC_BUILDER_DMS_STR](language-reference/domain-modifiers/LOC_BUILDER_DMS_STR.md) + * [LOC_BUILDER_STR](language-reference/domain-modifiers/LOC_BUILDER_STR.md) + * [M365_BUILDER](language-reference/domain-modifiers/M365_BUILDER.md) + * [MX](language-reference/domain-modifiers/MX.md) + * [NAMESERVER](language-reference/domain-modifiers/NAMESERVER.md) + * [NAMESERVER_TTL](language-reference/domain-modifiers/NAMESERVER_TTL.md) + * [NAPTR](language-reference/domain-modifiers/NAPTR.md) + * [NO_PURGE](language-reference/domain-modifiers/NO_PURGE.md) + * [NS](language-reference/domain-modifiers/NS.md) + * [PTR](language-reference/domain-modifiers/PTR.md) + * [PURGE](language-reference/domain-modifiers/PURGE.md) + * [SOA](language-reference/domain-modifiers/SOA.md) + * [SPF_BUILDER](language-reference/domain-modifiers/SPF_BUILDER.md) + * [SRV](language-reference/domain-modifiers/SRV.md) + * [SSHFP](language-reference/domain-modifiers/SSHFP.md) + * [TLSA](language-reference/domain-modifiers/TLSA.md) + * [TXT](language-reference/domain-modifiers/TXT.md) + * [URL](language-reference/domain-modifiers/URL.md) + * [URL301](language-reference/domain-modifiers/URL301.md) * Service Provider specific * Akamai Edge Dns - * [AKAMAICDN](functions/domain/AKAMAICDN.md) + * [AKAMAICDN](language-reference/domain-modifiers/AKAMAICDN.md) * Amazon Route 53 - * [R53_ALIAS](functions/domain/R53_ALIAS.md) + * [R53_ALIAS](language-reference/domain-modifiers/R53_ALIAS.md) * Azure DNS - * [AZURE_ALIAS](functions/domain/AZURE_ALIAS.md) + * [AZURE_ALIAS](language-reference/domain-modifiers/AZURE_ALIAS.md) * Cloudflare DNS - * [CF_REDIRECT](functions/domain/CF_REDIRECT.md) - * [CF_TEMP_REDIRECT](functions/domain/CF_TEMP_REDIRECT.md) - * [CF_WORKER_ROUTE](functions/domain/CF_WORKER_ROUTE.md) + * [CF_REDIRECT](language-reference/domain-modifiers/CF_REDIRECT.md) + * [CF_TEMP_REDIRECT](language-reference/domain-modifiers/CF_TEMP_REDIRECT.md) + * [CF_WORKER_ROUTE](language-reference/domain-modifiers/CF_WORKER_ROUTE.md) * ClouDNS - * [CLOUDNS_WR](functions/domain/CLOUDNS_WR.md) + * [CLOUDNS_WR](language-reference/domain-modifiers/CLOUDNS_WR.md) * NS1 - * [NS1_URLFWD](functions/domain/NS1_URLFWD.md) + * [NS1_URLFWD](language-reference/domain-modifiers/NS1_URLFWD.md) * Record Modifiers - * [TTL](functions/record/TTL.md) + * [TTL](language-reference/record-modifiers/TTL.md) * Service Provider specific * Amazon Route 53 - * [R53_ZONE](functions/record/R53_ZONE.md) - * [R53_EVALUATE_TARGET_HEALTH](functions/record/R53\_EVALUATE\_TARGET\_HEALTH.md) + * [R53_ZONE](language-reference/record-modifiers/R53_ZONE.md) + * [R53_EVALUATE_TARGET_HEALTH](language-reference/record-modifiers/R53\_EVALUATE\_TARGET\_HEALTH.md) * [Why CNAME/MX/NS targets require a "dot"](why-the-dot.md) ## Service Providers diff --git a/documentation/adding-new-rtypes.md b/documentation/adding-new-rtypes.md index c55730bb3..b3677eb7d 100644 --- a/documentation/adding-new-rtypes.md +++ b/documentation/adding-new-rtypes.md @@ -79,9 +79,9 @@ popd func matrixData() *FeatureMatrix { const ( ... - DomainModifierCaa = "[`CAA`](functions/domain/CAA.md)" - + DomainModifierFoo = "[`FOO`](functions/domain/FOO.md)" - DomainModifierLoc = "[`LOC`](functions/domain/LOC.md)" + DomainModifierCaa = "[`CAA`](language-reference/domain-modifiers/CAA.md)" + + DomainModifierFoo = "[`FOO`](language-reference/domain-modifiers/FOO.md)" + DomainModifierLoc = "[`LOC`](language-reference/domain-modifiers/LOC.md)" ... ) matrix := &FeatureMatrix{ @@ -153,7 +153,7 @@ example we removed `providers.CanUseCAA` from the Add a function to `pkg/js/helpers.js` for the new record type. This is the JavaScript file that defines `dnsconfig.js`'s functions like -[`A()`](functions/domain/A.md) and [`MX()`](functions/domain/MX.md). Look at the definition of `A`, `MX` and `CAA` for good +[`A()`](language-reference/domain-modifiers/A.md) and [`MX()`](language-reference/domain-modifiers/MX.md). Look at the definition of `A`, `MX` and `CAA` for good examples to use as a base. Please add the function alphabetically with the others. Also, please run @@ -292,7 +292,7 @@ tests, please ask! ## Step 8: Write documentation -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: +Add a new Markdown file to `documentation/language-reference/domain-modifiers`. 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: - `name`: The name of the record. This should match the file name and the name of the record in `helpers.js`. - `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. @@ -307,24 +307,24 @@ Add the new file `FOO.md` to the documentation table of contents [`documentation ... * Domain Modifiers ... - * [DnsProvider](functions/domain/DnsProvider.md) -+ * [FOO](functions/domain/FOO.md) - * [FRAME](functions/domain/FRAME.md) + * [DnsProvider](language-reference/domain-modifiers/DnsProvider.md) ++ * [FOO](language-reference/domain-modifiers/FOO.md) + * [FRAME](language-reference/domain-modifiers/FRAME.md) ... * Service Provider specific ... * ClouDNS - * [CLOUDNS_WR](functions/domain/CLOUDNS_WR.md) + * [CLOUDNS_WR](language-reference/domain-modifiers/CLOUDNS_WR.md) + * ASDF -+ * [ASDF_NINJA](function/domain/ASDF_NINJA.md) ++ * [ASDF_NINJA](language-reference/domain-modifiers/ASDF_NINJA.md) * NS1 - * [NS1_URLFWD](functions/domain/NS1_URLFWD.md) + * [NS1_URLFWD](language-reference/domain-modifiers/NS1_URLFWD.md) ... * Record Modifiers ... - * [DMARC_BUILDER](functions/domain/DMARC_BUILDER.md) -+ * [FOO_HELPER](functions/record/FOO_HELPER.md) - * [SPF_BUILDER](functions/domain/SPF_BUILDER.md) + * [DMARC_BUILDER](language-reference/domain-modifiers/DMARC_BUILDER.md) ++ * [FOO_HELPER](language-reference/record-modifiers/FOO_HELPER.md) + * [SPF_BUILDER](language-reference/domain-modifiers/SPF_BUILDER.md) ... ``` {% endcode %} diff --git a/documentation/code-tricks.md b/documentation/code-tricks.md index c77a4ab5f..6700866fb 100644 --- a/documentation/code-tricks.md +++ b/documentation/code-tricks.md @@ -4,10 +4,10 @@ Problem: It is difficult to get CAA and other records exactly right. Solution: Use a "builder" to construct it for you. -* [CAA Builder](functions/domain/CAA_BUILDER.md) -* [DMARC Builder](functions/domain/DMARC_BUILDER.md) -* [M365_BUILDER](functions/domain/M365_BUILDER.md) -* [SPF Optimizer](functions/domain/SPF_BUILDER.md) +* [CAA Builder](language-reference/domain-modifiers/CAA_BUILDER.md) +* [DMARC Builder](language-reference/domain-modifiers/DMARC_BUILDER.md) +* [M365_BUILDER](language-reference/domain-modifiers/M365_BUILDER.md) +* [SPF Optimizer](language-reference/domain-modifiers/SPF_BUILDER.md) # Trailing commas @@ -21,7 +21,7 @@ Because the DNSControl JavaScript DSL has no trailing commas, you can use the `E **NOTE**: `END` is just an alias for `{}`, which is ignored by DNSControl. {% endhint %} -Let's take an example with domain: `example.com`. We have recorded the [A-record](functions/domain/A.md) 'foo' configured. +Let's take an example with domain: `example.com`. We have recorded the [A-record](language-reference/domain-modifiers/A.md) 'foo' configured. {% code title="dnsconfig.js" %} ```javascript @@ -31,7 +31,7 @@ D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), ``` {% endcode %} -Let's say we want to add an [A record](functions/domain/A.md) 'bar' to this domain. +Let's say we want to add an [A record](language-reference/domain-modifiers/A.md) 'bar' to this domain. {% code title="dnsconfig.js" %} ```javascript @@ -221,5 +221,5 @@ domain exists, who requested it, any associated ticket numbers, and so on. We also comment the individual parts of a record. Look at the [SPF -Optimizer](functions/domain/SPF_BUILDER.md) example. Each part of +Optimizer](language-reference/domain-modifiers/SPF_BUILDER.md) example. Each part of the SPF record has a comment. diff --git a/documentation/examples.md b/documentation/examples.md index b2f1db50b..eb068fb3a 100644 --- a/documentation/examples.md +++ b/documentation/examples.md @@ -51,7 +51,7 @@ D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_R53), {% endcode %} {% hint style="info" %} -**NOTE**: The [`IP()`](functions/global/IP.md) function doesn't currently support IPv6 (PRs welcome!). IPv6 addresses are strings. +**NOTE**: The [`IP()`](language-reference/top-level-functions/IP.md) function doesn't currently support IPv6 (PRs welcome!). IPv6 addresses are strings. {% endhint %} {% code title="dnsconfig.js" %} ```javascript diff --git a/documentation/functions/record/R53_ZONE.md b/documentation/functions/record/R53_ZONE.md deleted file mode 100644 index 8fa6a09aa..000000000 --- a/documentation/functions/record/R53_ZONE.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -name: R53_ZONE -parameters: - - zone_id -parameter_types: - zone_id: string -ts_return: DomainModifier & RecordModifier -provider: ROUTE53 ---- - -`R53_ZONE` lets you specify the AWS Zone ID for an entire domain ([`D()`](../global/D.md)) or a specific [`R53_ALIAS()`](../domain/R53_ALIAS.md) record. - -When used with [`D()`](../global/D.md), it sets the zone id of the domain. This can be used to differentiate between split horizon domains in public and private zones. See this [example](../../providers/route53.md#split-horizon) in the [Amazon Route 53 provider page](../../providers/route53.md). - -When used with [`R53_ALIAS()`](../domain/R53_ALIAS.md) it sets the required Route53 hosted zone id in a R53_ALIAS record. See [`R53_ALIAS()`](../domain/R53_ALIAS.md) documentation for details. diff --git a/documentation/index.md b/documentation/index.md index 4f785a531..44b773ba9 100644 --- a/documentation/index.md +++ b/documentation/index.md @@ -18,7 +18,7 @@ Take advantage of the advanced features. Use macros and variables for easier upd * Supports 35+ [DNS Providers](providers.md) including [BIND](providers/bind.md), [AWS Route 53](providers/route53.md), [Google DNS](providers/gcloud.md), and [name.com](providers/namedotcom.md). * [Apply CI/CD principles](ci-cd-gitlab.md) to DNS: Unit-tests, system-tests, automated deployment. * All the benefits of Git (or any VCS) for your DNS zone data. View history. Accept PRs. -* Optimize DNS with [SPF optimizer](functions/domain/SPF_BUILDER.md). Detect too many lookups. Flatten includes. +* Optimize DNS with [SPF optimizer](language-reference/domain-modifiers/SPF_BUILDER.md). Detect too many lookups. Flatten includes. * Runs on Linux, Windows, Mac, or any operating system supported by Go. * Enable/disable Cloudflare proxying (the "orange cloud" button) directly from your DNSControl files. * [Assign an IP address to a constant](examples.md#variables-for-common-ip-addresses) and use the variable name throughout the configuration. Need to change the IP address globally? Just change the variable and "recompile". diff --git a/documentation/functions/domain/A.md b/documentation/language-reference/domain-modifiers/A.md similarity index 93% rename from documentation/functions/domain/A.md rename to documentation/language-reference/domain-modifiers/A.md index 8c1dbd1f3..c24c0d634 100644 --- a/documentation/functions/domain/A.md +++ b/documentation/language-reference/domain-modifiers/A.md @@ -12,7 +12,7 @@ parameter_types: A adds an A record To a domain. The name should be the relative label for the record. Use `@` for the domain apex. -The address should be an ip address, either a string, or a numeric value obtained via [IP](../global/IP.md). +The address should be an ip address, either a string, or a numeric value obtained via [IP](../top-level-functions/IP.md). Modifiers can be any number of [record modifiers](https://docs.dnscontrol.org/language-reference/record-modifiers) or JSON objects, which will be merged into the record's metadata. diff --git a/documentation/functions/domain/AAAA.md b/documentation/language-reference/domain-modifiers/AAAA.md similarity index 100% rename from documentation/functions/domain/AAAA.md rename to documentation/language-reference/domain-modifiers/AAAA.md diff --git a/documentation/functions/domain/AKAMAICDN.md b/documentation/language-reference/domain-modifiers/AKAMAICDN.md similarity index 100% rename from documentation/functions/domain/AKAMAICDN.md rename to documentation/language-reference/domain-modifiers/AKAMAICDN.md diff --git a/documentation/functions/domain/ALIAS.md b/documentation/language-reference/domain-modifiers/ALIAS.md similarity index 100% rename from documentation/functions/domain/ALIAS.md rename to documentation/language-reference/domain-modifiers/ALIAS.md diff --git a/documentation/functions/domain/AUTODNSSEC_OFF.md b/documentation/language-reference/domain-modifiers/AUTODNSSEC_OFF.md similarity index 100% rename from documentation/functions/domain/AUTODNSSEC_OFF.md rename to documentation/language-reference/domain-modifiers/AUTODNSSEC_OFF.md diff --git a/documentation/functions/domain/AUTODNSSEC_ON.md b/documentation/language-reference/domain-modifiers/AUTODNSSEC_ON.md similarity index 100% rename from documentation/functions/domain/AUTODNSSEC_ON.md rename to documentation/language-reference/domain-modifiers/AUTODNSSEC_ON.md diff --git a/documentation/functions/domain/AZURE_ALIAS.md b/documentation/language-reference/domain-modifiers/AZURE_ALIAS.md similarity index 100% rename from documentation/functions/domain/AZURE_ALIAS.md rename to documentation/language-reference/domain-modifiers/AZURE_ALIAS.md diff --git a/documentation/functions/domain/CAA.md b/documentation/language-reference/domain-modifiers/CAA.md similarity index 100% rename from documentation/functions/domain/CAA.md rename to documentation/language-reference/domain-modifiers/CAA.md diff --git a/documentation/functions/domain/CAA_BUILDER.md b/documentation/language-reference/domain-modifiers/CAA_BUILDER.md similarity index 95% rename from documentation/functions/domain/CAA_BUILDER.md rename to documentation/language-reference/domain-modifiers/CAA_BUILDER.md index d3f928038..dd1c9274d 100644 --- a/documentation/functions/domain/CAA_BUILDER.md +++ b/documentation/language-reference/domain-modifiers/CAA_BUILDER.md @@ -20,7 +20,7 @@ parameter_types: --- DNSControl contains a `CAA_BUILDER` which can be used to simply create -[`CAA()`](../domain/CAA.md) records for your domains. Instead of creating each [`CAA()`](../domain/CAA.md) record +[`CAA()`](../domain-modifiers/CAA.md) records for your domains. Instead of creating each [`CAA()`](../domain-modifiers/CAA.md) record individually, you can simply configure your report mail address, the authorized certificate authorities and the builder cares about the rest. diff --git a/documentation/functions/domain/CF_REDIRECT.md b/documentation/language-reference/domain-modifiers/CF_REDIRECT.md similarity index 100% rename from documentation/functions/domain/CF_REDIRECT.md rename to documentation/language-reference/domain-modifiers/CF_REDIRECT.md diff --git a/documentation/functions/domain/CF_TEMP_REDIRECT.md b/documentation/language-reference/domain-modifiers/CF_TEMP_REDIRECT.md similarity index 100% rename from documentation/functions/domain/CF_TEMP_REDIRECT.md rename to documentation/language-reference/domain-modifiers/CF_TEMP_REDIRECT.md diff --git a/documentation/functions/domain/CF_WORKER_ROUTE.md b/documentation/language-reference/domain-modifiers/CF_WORKER_ROUTE.md similarity index 100% rename from documentation/functions/domain/CF_WORKER_ROUTE.md rename to documentation/language-reference/domain-modifiers/CF_WORKER_ROUTE.md diff --git a/documentation/functions/domain/CLOUDNS_WR.md b/documentation/language-reference/domain-modifiers/CLOUDNS_WR.md similarity index 100% rename from documentation/functions/domain/CLOUDNS_WR.md rename to documentation/language-reference/domain-modifiers/CLOUDNS_WR.md diff --git a/documentation/functions/domain/CNAME.md b/documentation/language-reference/domain-modifiers/CNAME.md similarity index 100% rename from documentation/functions/domain/CNAME.md rename to documentation/language-reference/domain-modifiers/CNAME.md diff --git a/documentation/functions/domain/DHCID.md b/documentation/language-reference/domain-modifiers/DHCID.md similarity index 100% rename from documentation/functions/domain/DHCID.md rename to documentation/language-reference/domain-modifiers/DHCID.md diff --git a/documentation/functions/domain/DISABLE_IGNORE_SAFETY_CHECK.md b/documentation/language-reference/domain-modifiers/DISABLE_IGNORE_SAFETY_CHECK.md similarity index 88% rename from documentation/functions/domain/DISABLE_IGNORE_SAFETY_CHECK.md rename to documentation/language-reference/domain-modifiers/DISABLE_IGNORE_SAFETY_CHECK.md index 4954b6b15..ecb77dff3 100644 --- a/documentation/functions/domain/DISABLE_IGNORE_SAFETY_CHECK.md +++ b/documentation/language-reference/domain-modifiers/DISABLE_IGNORE_SAFETY_CHECK.md @@ -9,7 +9,7 @@ safety check for the entire domain. It replaces the per-record `IGNORE_NAME_DISABLE_SAFETY_CHECK()` which is deprecated as of DNSControl v4.0.0.0. -See [`IGNORE()`](../domain/IGNORE.md) for more information. +See [`IGNORE()`](../domain-modifiers/IGNORE.md) for more information. ## Syntax diff --git a/documentation/functions/domain/DMARC_BUILDER.md b/documentation/language-reference/domain-modifiers/DMARC_BUILDER.md similarity index 100% rename from documentation/functions/domain/DMARC_BUILDER.md rename to documentation/language-reference/domain-modifiers/DMARC_BUILDER.md diff --git a/documentation/functions/domain/DNAME.md b/documentation/language-reference/domain-modifiers/DNAME.md similarity index 100% rename from documentation/functions/domain/DNAME.md rename to documentation/language-reference/domain-modifiers/DNAME.md diff --git a/documentation/functions/domain/DS.md b/documentation/language-reference/domain-modifiers/DS.md similarity index 100% rename from documentation/functions/domain/DS.md rename to documentation/language-reference/domain-modifiers/DS.md diff --git a/documentation/functions/domain/DefaultTTL.md b/documentation/language-reference/domain-modifiers/DefaultTTL.md similarity index 60% rename from documentation/functions/domain/DefaultTTL.md rename to documentation/language-reference/domain-modifiers/DefaultTTL.md index 7df9b7b3a..bc8516f5e 100644 --- a/documentation/functions/domain/DefaultTTL.md +++ b/documentation/language-reference/domain-modifiers/DefaultTTL.md @@ -6,10 +6,10 @@ parameter_types: ttl: Duration --- -DefaultTTL sets the TTL for all subsequent records following it in a domain that do not explicitly set one with [`TTL`](../record/TTL.md). If neither `DefaultTTL` or `TTL` exist for a record, -the record will inherit the DNSControl global internal default of 300 seconds. See also [`DEFAULTS`](../global/DEFAULTS.md) to override the internal defaults. +DefaultTTL sets the TTL for all subsequent records following it in a domain that do not explicitly set one with [`TTL`](../record-modifiers/TTL.md). If neither `DefaultTTL` or `TTL` exist for a record, +the record will inherit the DNSControl global internal default of 300 seconds. See also [`DEFAULTS`](../top-level-functions/DEFAULTS.md) to override the internal defaults. -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. +NS records are currently a special case, and do not inherit from `DefaultTTL`. See [`NAMESERVER_TTL`](../domain-modifiers/NAMESERVER_TTL.md) to set a default TTL for all NS records. {% code title="dnsconfig.js" %} @@ -22,5 +22,5 @@ D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), ``` {% endcode %} -The DefaultTTL duration is the same format as [`TTL`](../record/TTL.md), an integer number of seconds +The DefaultTTL duration is the same format as [`TTL`](../record-modifiers/TTL.md), an integer number of seconds or a string with a unit such as `"4d"`. diff --git a/documentation/functions/domain/DnsProvider.md b/documentation/language-reference/domain-modifiers/DnsProvider.md similarity index 94% rename from documentation/functions/domain/DnsProvider.md rename to documentation/language-reference/domain-modifiers/DnsProvider.md index ccefe44b8..075d12b0d 100644 --- a/documentation/functions/domain/DnsProvider.md +++ b/documentation/language-reference/domain-modifiers/DnsProvider.md @@ -9,7 +9,7 @@ parameter_types: --- DnsProvider indicates that the specified provider should be used to manage -records for this domain. The name must match the name used with [NewDnsProvider](../global/NewDnsProvider.md). +records for this domain. The name must match the name used with [NewDnsProvider](../top-level-functions/NewDnsProvider.md). The nsCount parameter determines how the nameservers will be managed from this provider. diff --git a/documentation/functions/domain/FRAME.md b/documentation/language-reference/domain-modifiers/FRAME.md similarity index 100% rename from documentation/functions/domain/FRAME.md rename to documentation/language-reference/domain-modifiers/FRAME.md diff --git a/documentation/functions/domain/IGNORE.md b/documentation/language-reference/domain-modifiers/IGNORE.md similarity index 98% rename from documentation/functions/domain/IGNORE.md rename to documentation/language-reference/domain-modifiers/IGNORE.md index e840a904c..3a5322ffd 100644 --- a/documentation/functions/domain/IGNORE.md +++ b/documentation/language-reference/domain-modifiers/IGNORE.md @@ -26,11 +26,11 @@ records. Technically `IGNORE_NAME` is a promise that DNSControl will not modify or delete existing records that match particular patterns. It is like -[`NO_PURGE`](../domain/NO_PURGE.md) that matches only specific records. +[`NO_PURGE`](../domain-modifiers/NO_PURGE.md) that matches only specific records. Including a record that is ignored is considered an error and may have undefined behavior. This safety check can be disabled using the -[`DISABLE_IGNORE_SAFETY_CHECK`](../domain/DISABLE_IGNORE_SAFETY_CHECK.md) feature. +[`DISABLE_IGNORE_SAFETY_CHECK`](../domain-modifiers/DISABLE_IGNORE_SAFETY_CHECK.md) feature. ## Syntax @@ -45,7 +45,7 @@ IGNORE(labelSpec): {% endcode %} * `labelSpec` is a glob that matches the DNS label. For example `"foo"` or `"foo*"`. `"*"` matches all labels, as does the empty string (`""`). -* `typeSpec` is a comma-separated list of DNS types. For example `"A"` matches DNS A records, `"A,CNAME"` matches both A and CNAME records. `"*"` matches any DNS type, as does the empty string (`""`). +* `typeSpec` is a comma-separated list of DNS types. For example `"A"` matches DNS A records, `"A,CNAME"` matches both A and CNAME records. `"*"` matches any DNS type, as does the empty string (`""`). * `targetSpec` is a glob that matches the DNS target. For example `"foo"` or `"foo*"`. `"*"` matches all targets, as does the empty string (`""`). `typeSpec` and `targetSpec` default to `"*"` if they are omitted. diff --git a/documentation/functions/domain/IGNORE_NAME.md b/documentation/language-reference/domain-modifiers/IGNORE_NAME.md similarity index 100% rename from documentation/functions/domain/IGNORE_NAME.md rename to documentation/language-reference/domain-modifiers/IGNORE_NAME.md diff --git a/documentation/functions/domain/IGNORE_TARGET.md b/documentation/language-reference/domain-modifiers/IGNORE_TARGET.md similarity index 100% rename from documentation/functions/domain/IGNORE_TARGET.md rename to documentation/language-reference/domain-modifiers/IGNORE_TARGET.md diff --git a/documentation/functions/domain/IMPORT_TRANSFORM.md b/documentation/language-reference/domain-modifiers/IMPORT_TRANSFORM.md similarity index 100% rename from documentation/functions/domain/IMPORT_TRANSFORM.md rename to documentation/language-reference/domain-modifiers/IMPORT_TRANSFORM.md diff --git a/documentation/functions/domain/INCLUDE.md b/documentation/language-reference/domain-modifiers/INCLUDE.md similarity index 100% rename from documentation/functions/domain/INCLUDE.md rename to documentation/language-reference/domain-modifiers/INCLUDE.md diff --git a/documentation/functions/domain/LOC.md b/documentation/language-reference/domain-modifiers/LOC.md similarity index 100% rename from documentation/functions/domain/LOC.md rename to documentation/language-reference/domain-modifiers/LOC.md diff --git a/documentation/functions/domain/LOC_BUILDER_DD.md b/documentation/language-reference/domain-modifiers/LOC_BUILDER_DD.md similarity index 100% rename from documentation/functions/domain/LOC_BUILDER_DD.md rename to documentation/language-reference/domain-modifiers/LOC_BUILDER_DD.md diff --git a/documentation/functions/domain/LOC_BUILDER_DMM_STR.md b/documentation/language-reference/domain-modifiers/LOC_BUILDER_DMM_STR.md similarity index 100% rename from documentation/functions/domain/LOC_BUILDER_DMM_STR.md rename to documentation/language-reference/domain-modifiers/LOC_BUILDER_DMM_STR.md diff --git a/documentation/functions/domain/LOC_BUILDER_DMS_STR.md b/documentation/language-reference/domain-modifiers/LOC_BUILDER_DMS_STR.md similarity index 100% rename from documentation/functions/domain/LOC_BUILDER_DMS_STR.md rename to documentation/language-reference/domain-modifiers/LOC_BUILDER_DMS_STR.md diff --git a/documentation/functions/domain/LOC_BUILDER_STR.md b/documentation/language-reference/domain-modifiers/LOC_BUILDER_STR.md similarity index 100% rename from documentation/functions/domain/LOC_BUILDER_STR.md rename to documentation/language-reference/domain-modifiers/LOC_BUILDER_STR.md diff --git a/documentation/functions/domain/M365_BUILDER.md b/documentation/language-reference/domain-modifiers/M365_BUILDER.md similarity index 100% rename from documentation/functions/domain/M365_BUILDER.md rename to documentation/language-reference/domain-modifiers/M365_BUILDER.md diff --git a/documentation/functions/domain/MX.md b/documentation/language-reference/domain-modifiers/MX.md similarity index 100% rename from documentation/functions/domain/MX.md rename to documentation/language-reference/domain-modifiers/MX.md diff --git a/documentation/functions/domain/NAMESERVER.md b/documentation/language-reference/domain-modifiers/NAMESERVER.md similarity index 100% rename from documentation/functions/domain/NAMESERVER.md rename to documentation/language-reference/domain-modifiers/NAMESERVER.md diff --git a/documentation/functions/domain/NAMESERVER_TTL.md b/documentation/language-reference/domain-modifiers/NAMESERVER_TTL.md similarity index 88% rename from documentation/functions/domain/NAMESERVER_TTL.md rename to documentation/language-reference/domain-modifiers/NAMESERVER_TTL.md index f2d40cdb8..b2d7997b6 100644 --- a/documentation/functions/domain/NAMESERVER_TTL.md +++ b/documentation/language-reference/domain-modifiers/NAMESERVER_TTL.md @@ -10,7 +10,7 @@ parameter_types: NAMESERVER_TTL sets the TTL on the domain apex NS RRs defined by [`NAMESERVER`](NAMESERVER.md). -The value can be an integer or a string. See [`TTL`](../record/TTL.md) for examples. +The value can be an integer or a string. See [`TTL`](../record-modifiers/TTL.md) for examples. {% code title="dnsconfig.js" %} ```javascript @@ -36,4 +36,4 @@ D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), ``` {% endcode %} -To apply a default TTL to all other record types, see [`DefaultTTL`](../domain/DefaultTTL.md) +To apply a default TTL to all other record types, see [`DefaultTTL`](../domain-modifiers/DefaultTTL.md) diff --git a/documentation/functions/domain/NAPTR.md b/documentation/language-reference/domain-modifiers/NAPTR.md similarity index 100% rename from documentation/functions/domain/NAPTR.md rename to documentation/language-reference/domain-modifiers/NAPTR.md diff --git a/documentation/functions/domain/NO_PURGE.md b/documentation/language-reference/domain-modifiers/NO_PURGE.md similarity index 100% rename from documentation/functions/domain/NO_PURGE.md rename to documentation/language-reference/domain-modifiers/NO_PURGE.md diff --git a/documentation/functions/domain/NS.md b/documentation/language-reference/domain-modifiers/NS.md similarity index 100% rename from documentation/functions/domain/NS.md rename to documentation/language-reference/domain-modifiers/NS.md diff --git a/documentation/functions/domain/NS1_URLFWD.md b/documentation/language-reference/domain-modifiers/NS1_URLFWD.md similarity index 100% rename from documentation/functions/domain/NS1_URLFWD.md rename to documentation/language-reference/domain-modifiers/NS1_URLFWD.md diff --git a/documentation/functions/domain/PTR.md b/documentation/language-reference/domain-modifiers/PTR.md similarity index 98% rename from documentation/functions/domain/PTR.md rename to documentation/language-reference/domain-modifiers/PTR.md index b6c8862f3..e8ea94e57 100644 --- a/documentation/functions/domain/PTR.md +++ b/documentation/language-reference/domain-modifiers/PTR.md @@ -53,7 +53,7 @@ are all equivalent: * `PTR("4.3", ...` // Assuming the domain is `2.1.in-addr.arpa` All magic is RFC2317-aware. We use the first format listed in the -RFC for both [`REV()`](../global/REV.md) and `PTR()`. The format is +RFC for both [`REV()`](../top-level-functions/REV.md) and `PTR()`. The format is `FIRST/MASK.C.B.A.in-addr.arpa` where `FIRST` is the first IP address of the zone, `MASK` is the netmask of the zone (25-31 inclusive), and A, B, C are the first 3 octets of the IP address. For example diff --git a/documentation/functions/domain/PURGE.md b/documentation/language-reference/domain-modifiers/PURGE.md similarity index 100% rename from documentation/functions/domain/PURGE.md rename to documentation/language-reference/domain-modifiers/PURGE.md diff --git a/documentation/functions/domain/R53_ALIAS.md b/documentation/language-reference/domain-modifiers/R53_ALIAS.md similarity index 97% rename from documentation/functions/domain/R53_ALIAS.md rename to documentation/language-reference/domain-modifiers/R53_ALIAS.md index d247f4e8b..c7f4b0d0c 100644 --- a/documentation/functions/domain/R53_ALIAS.md +++ b/documentation/language-reference/domain-modifiers/R53_ALIAS.md @@ -29,7 +29,7 @@ The Target can be any of: * _S3 bucket_ (configured as website): specify the domain name of the Amazon S3 website endpoint in which you configured the bucket (for instance s3-website-us-east-2.amazonaws.com). For the available values refer to the [Amazon S3 Website Endpoints](https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region). * _Another Route53 record_: specify the value of the name of another record in the same hosted zone. -For all the target type, excluding 'another record', you have to specify the `Zone ID` of the target. This is done by using the [`R53_ZONE`](../record/R53_ZONE.md) record modifier. +For all the target type, excluding 'another record', you have to specify the `Zone ID` of the target. This is done by using the [`R53_ZONE`](../record-modifiers/R53_ZONE.md) record modifier. The zone id can be found depending on the target type: @@ -39,7 +39,7 @@ The zone id can be found depending on the target type: * _S3 bucket_ (configured as website): specify the hosted zone ID for the region that you created the bucket in. You can find it in [the List of regions and hosted Zone IDs](https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region) * _Another Route 53 record_: you can either specify the correct zone id or do not specify anything and DNSControl will figure out the right zone id. (Note: Route53 alias can't reference a record in a different zone). -Target health evaluation can be enabled with the [`R53_EVALUATE_TARGET_HEALTH`](../record/R53\_EVALUATE\_TARGET\_HEALTH.md) record modifier. +Target health evaluation can be enabled with the [`R53_EVALUATE_TARGET_HEALTH`](../record-modifiers/R53\_EVALUATE\_TARGET\_HEALTH.md) record modifier. {% code title="dnsconfig.js" %} ```javascript diff --git a/documentation/functions/domain/SOA.md b/documentation/language-reference/domain-modifiers/SOA.md similarity index 100% rename from documentation/functions/domain/SOA.md rename to documentation/language-reference/domain-modifiers/SOA.md diff --git a/documentation/functions/domain/SPF_BUILDER.md b/documentation/language-reference/domain-modifiers/SPF_BUILDER.md similarity index 100% rename from documentation/functions/domain/SPF_BUILDER.md rename to documentation/language-reference/domain-modifiers/SPF_BUILDER.md diff --git a/documentation/functions/domain/SRV.md b/documentation/language-reference/domain-modifiers/SRV.md similarity index 100% rename from documentation/functions/domain/SRV.md rename to documentation/language-reference/domain-modifiers/SRV.md diff --git a/documentation/functions/domain/SSHFP.md b/documentation/language-reference/domain-modifiers/SSHFP.md similarity index 100% rename from documentation/functions/domain/SSHFP.md rename to documentation/language-reference/domain-modifiers/SSHFP.md diff --git a/documentation/functions/domain/TLSA.md b/documentation/language-reference/domain-modifiers/TLSA.md similarity index 100% rename from documentation/functions/domain/TLSA.md rename to documentation/language-reference/domain-modifiers/TLSA.md diff --git a/documentation/functions/domain/TXT.md b/documentation/language-reference/domain-modifiers/TXT.md similarity index 98% rename from documentation/functions/domain/TXT.md rename to documentation/language-reference/domain-modifiers/TXT.md index 67b18dc5b..d7ec0969f 100644 --- a/documentation/functions/domain/TXT.md +++ b/documentation/language-reference/domain-modifiers/TXT.md @@ -87,7 +87,7 @@ double quotes, back-ticks, or other chars. #### How can you tell if a provider will support a particular `TXT()` record? -Include the `TXT()` record in a [`D()`](../global/D.md) as usual, along +Include the `TXT()` record in a [`D()`](../top-level-functions/D.md) as usual, along with the `DnsProvider()` for that provider. Run `dnscontrol check` to see if any errors are produced. The check command does not talk to the provider's API, thus permitting you to do this without having an diff --git a/documentation/functions/domain/URL.md b/documentation/language-reference/domain-modifiers/URL.md similarity index 100% rename from documentation/functions/domain/URL.md rename to documentation/language-reference/domain-modifiers/URL.md diff --git a/documentation/functions/domain/URL301.md b/documentation/language-reference/domain-modifiers/URL301.md similarity index 100% rename from documentation/functions/domain/URL301.md rename to documentation/language-reference/domain-modifiers/URL301.md diff --git a/documentation/functions/record/R53_EVALUATE_TARGET_HEALTH.md b/documentation/language-reference/record-modifiers/R53_EVALUATE_TARGET_HEALTH.md similarity index 57% rename from documentation/functions/record/R53_EVALUATE_TARGET_HEALTH.md rename to documentation/language-reference/record-modifiers/R53_EVALUATE_TARGET_HEALTH.md index 72f3ffedc..95f28e01a 100644 --- a/documentation/functions/record/R53_EVALUATE_TARGET_HEALTH.md +++ b/documentation/language-reference/record-modifiers/R53_EVALUATE_TARGET_HEALTH.md @@ -8,4 +8,4 @@ ts_return: RecordModifier provider: ROUTE53 --- -`R53_EVALUATE_TARGET_HEALTH` lets you enable target health evaluation for a [`R53_ALIAS()`](../domain/R53_ALIAS.md) record. Omitting `R53_EVALUATE_TARGET_HEALTH()` from `R53_ALIAS()` set the behavior to false. +`R53_EVALUATE_TARGET_HEALTH` lets you enable target health evaluation for a [`R53_ALIAS()`](../domain-modifiers/R53_ALIAS.md) record. Omitting `R53_EVALUATE_TARGET_HEALTH()` from `R53_ALIAS()` set the behavior to false. diff --git a/documentation/language-reference/record-modifiers/R53_ZONE.md b/documentation/language-reference/record-modifiers/R53_ZONE.md new file mode 100644 index 000000000..a15387df5 --- /dev/null +++ b/documentation/language-reference/record-modifiers/R53_ZONE.md @@ -0,0 +1,15 @@ +--- +name: R53_ZONE +parameters: + - zone_id +parameter_types: + zone_id: string +ts_return: DomainModifier & RecordModifier +provider: ROUTE53 +--- + +`R53_ZONE` lets you specify the AWS Zone ID for an entire domain ([`D()`](../top-level-functions/D.md)) or a specific [`R53_ALIAS()`](../domain-modifiers/R53_ALIAS.md) record. + +When used with [`D()`](../top-level-functions/D.md), it sets the zone id of the domain. This can be used to differentiate between split horizon domains in public and private zones. See this [example](../../providers/route53.md#split-horizon) in the [Amazon Route 53 provider page](../../providers/route53.md). + +When used with [`R53_ALIAS()`](../domain-modifiers/R53_ALIAS.md) it sets the required Route53 hosted zone id in a R53_ALIAS record. See [`R53_ALIAS()`](../domain-modifiers/R53_ALIAS.md) documentation for details. diff --git a/documentation/functions/record/TTL.md b/documentation/language-reference/record-modifiers/TTL.md similarity index 93% rename from documentation/functions/record/TTL.md rename to documentation/language-reference/record-modifiers/TTL.md index e51699bd2..a76806e0b 100644 --- a/documentation/functions/record/TTL.md +++ b/documentation/language-reference/record-modifiers/TTL.md @@ -7,7 +7,7 @@ parameter_types: --- TTL sets the TTL for a single record only. This will take precedence -over the domain's [DefaultTTL](../domain/DefaultTTL.md) if supplied. +over the domain's [DefaultTTL](../domain-modifiers/DefaultTTL.md) if supplied. The value can be: diff --git a/documentation/functions/global/D.md b/documentation/language-reference/top-level-functions/D.md similarity index 94% rename from documentation/functions/global/D.md rename to documentation/language-reference/top-level-functions/D.md index 5df7a190a..d2d48c84e 100644 --- a/documentation/functions/global/D.md +++ b/documentation/language-reference/top-level-functions/D.md @@ -12,11 +12,11 @@ parameter_types: `D` adds a new Domain for DNSControl to manage. The first two arguments are required: the domain name (fully qualified `example.com` without a trailing dot), and the name of the registrar (as previously declared with [NewRegistrar](NewRegistrar.md)). Any number of additional arguments may be included to add DNS Providers with [DNSProvider](NewDnsProvider.md), -add records with [A](../domain/A.md), [CNAME](../domain/CNAME.md), and so forth, or add metadata. +add records with [A](../domain-modifiers/A.md), [CNAME](../domain-modifiers/CNAME.md), and so forth, or add metadata. Modifier arguments are processed according to type as follows: -- A function argument will be called with the domain object as it's only argument. Most of the [built-in modifier functions](https://docs.dnscontrol.org/language-reference/domain-modifiers) return such functions. +- A function argument will be called with the domain object as it's only argument. Most of the [built-in modifier functions](https://docs.dnscontrol.org/language-reference/domain-modifiers-modifiers) return such functions. - An object argument will be merged into the domain's metadata collection. - An array argument will have all of it's members evaluated recursively. This allows you to combine multiple common records or modifiers into a variable that can be used like a macro in multiple domains. diff --git a/documentation/functions/global/DEFAULTS.md b/documentation/language-reference/top-level-functions/DEFAULTS.md similarity index 92% rename from documentation/functions/global/DEFAULTS.md rename to documentation/language-reference/top-level-functions/DEFAULTS.md index aac34f631..c31679581 100644 --- a/documentation/functions/global/DEFAULTS.md +++ b/documentation/language-reference/top-level-functions/DEFAULTS.md @@ -11,7 +11,7 @@ arguments passed as if they were the first modifiers in the argument list. ## Example -We want to create backup zone files for all domains, but not actually register them. Also create a [`DefaultTTL`](../domain/DefaultTTL.md). +We want to create backup zone files for all domains, but not actually register them. Also create a [`DefaultTTL`](../domain-modifiers/DefaultTTL.md). The domain `example.com` will have the defaults set. {% code title="dnsconfig.js" %} diff --git a/documentation/functions/global/DOMAIN_ELSEWHERE.md b/documentation/language-reference/top-level-functions/DOMAIN_ELSEWHERE.md similarity index 92% rename from documentation/functions/global/DOMAIN_ELSEWHERE.md rename to documentation/language-reference/top-level-functions/DOMAIN_ELSEWHERE.md index 2f6d0ed4e..5c30a1448 100644 --- a/documentation/functions/global/DOMAIN_ELSEWHERE.md +++ b/documentation/language-reference/top-level-functions/DOMAIN_ELSEWHERE.md @@ -40,6 +40,6 @@ D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), {% endcode %} {% hint style="info" %} -**NOTE**: The [`NO_PURGE`](../domain/NO_PURGE.md) is used out of abundance of caution but since no +**NOTE**: The [`NO_PURGE`](../domain-modifiers/NO_PURGE.md) is used out of abundance of caution but since no `DnsProvider()` statements exist, no updates would be performed. {% endhint %} diff --git a/documentation/functions/global/DOMAIN_ELSEWHERE_AUTO.md b/documentation/language-reference/top-level-functions/DOMAIN_ELSEWHERE_AUTO.md similarity index 92% rename from documentation/functions/global/DOMAIN_ELSEWHERE_AUTO.md rename to documentation/language-reference/top-level-functions/DOMAIN_ELSEWHERE_AUTO.md index 3c11a7756..74ad03493 100644 --- a/documentation/functions/global/DOMAIN_ELSEWHERE_AUTO.md +++ b/documentation/language-reference/top-level-functions/DOMAIN_ELSEWHERE_AUTO.md @@ -44,5 +44,5 @@ D("example.com", REG_NAMEDOTCOM, {% endcode %} {% hint style="info" %} -**NOTE**: The [`NO_PURGE`](../domain/NO_PURGE.md) is used to prevent DNSControl from changing the records. +**NOTE**: The [`NO_PURGE`](../domain-modifiers/NO_PURGE.md) is used to prevent DNSControl from changing the records. {% endhint %} diff --git a/documentation/functions/global/D_EXTEND.md b/documentation/language-reference/top-level-functions/D_EXTEND.md similarity index 96% rename from documentation/functions/global/D_EXTEND.md rename to documentation/language-reference/top-level-functions/D_EXTEND.md index 1e4f5e8fa..21f596c77 100644 --- a/documentation/functions/global/D_EXTEND.md +++ b/documentation/language-reference/top-level-functions/D_EXTEND.md @@ -29,7 +29,7 @@ defined as separate domains via separate [`D()`](D.md) statements, then not `domain.tld`. Some operators only act on an apex domain (e.g. -[`CF_REDIRECT`](../domain/CF_REDIRECT.md) and [`CF_TEMP_REDIRECT`](../domain/CF_TEMP_REDIRECT.md)). Using them +[`CF_REDIRECT`](../domain-modifiers/CF_REDIRECT.md) and [`CF_TEMP_REDIRECT`](../domain-modifiers/CF_TEMP_REDIRECT.md)). Using them in a `D_EXTEND` subdomain may not be what you expect. {% code title="dnsconfig.js" %} diff --git a/documentation/functions/global/FETCH.md b/documentation/language-reference/top-level-functions/FETCH.md similarity index 100% rename from documentation/functions/global/FETCH.md rename to documentation/language-reference/top-level-functions/FETCH.md diff --git a/documentation/functions/global/IP.md b/documentation/language-reference/top-level-functions/IP.md similarity index 100% rename from documentation/functions/global/IP.md rename to documentation/language-reference/top-level-functions/IP.md diff --git a/documentation/functions/global/NewDnsProvider.md b/documentation/language-reference/top-level-functions/NewDnsProvider.md similarity index 100% rename from documentation/functions/global/NewDnsProvider.md rename to documentation/language-reference/top-level-functions/NewDnsProvider.md diff --git a/documentation/functions/global/NewRegistrar.md b/documentation/language-reference/top-level-functions/NewRegistrar.md similarity index 100% rename from documentation/functions/global/NewRegistrar.md rename to documentation/language-reference/top-level-functions/NewRegistrar.md diff --git a/documentation/functions/global/PANIC.md b/documentation/language-reference/top-level-functions/PANIC.md similarity index 100% rename from documentation/functions/global/PANIC.md rename to documentation/language-reference/top-level-functions/PANIC.md diff --git a/documentation/functions/global/REV.md b/documentation/language-reference/top-level-functions/REV.md similarity index 100% rename from documentation/functions/global/REV.md rename to documentation/language-reference/top-level-functions/REV.md diff --git a/documentation/functions/global/REVCOMPAT.md b/documentation/language-reference/top-level-functions/REVCOMPAT.md similarity index 100% rename from documentation/functions/global/REVCOMPAT.md rename to documentation/language-reference/top-level-functions/REVCOMPAT.md diff --git a/documentation/functions/global/getConfiguredDomains.md b/documentation/language-reference/top-level-functions/getConfiguredDomains.md similarity index 100% rename from documentation/functions/global/getConfiguredDomains.md rename to documentation/language-reference/top-level-functions/getConfiguredDomains.md diff --git a/documentation/functions/global/require.md b/documentation/language-reference/top-level-functions/require.md similarity index 100% rename from documentation/functions/global/require.md rename to documentation/language-reference/top-level-functions/require.md diff --git a/documentation/functions/global/require_glob.md b/documentation/language-reference/top-level-functions/require_glob.md similarity index 100% rename from documentation/functions/global/require_glob.md rename to documentation/language-reference/top-level-functions/require_glob.md diff --git a/documentation/notifications.md b/documentation/notifications.md index efd274369..6b27bde83 100644 --- a/documentation/notifications.md +++ b/documentation/notifications.md @@ -28,7 +28,7 @@ Notifications are set up in your credentials JSON file. They will use the `notif If you want to send a notification, add the `--notify` flag to the `dnscontrol preview` or `dnscontrol push` commands. -Below is an example where we add [the A record](functions/domain/A.md) `foo` and display the notification output. +Below is an example where we add [the A record](language-reference/domain-modifiers/A.md) `foo` and display the notification output. {% code title="dnsconfig.js" %} ```diff diff --git a/documentation/providers.md b/documentation/providers.md index b3ef72fff..153ed0730 100644 --- a/documentation/providers.md +++ b/documentation/providers.md @@ -12,8 +12,8 @@ a provider that supports it, we'd love your contribution to ensure it works corr If a feature is definitively not supported for whatever reason, we would also like a PR to clarify why it is not supported, and fill in this entire matrix. -| Provider name | Official Support | DNS Provider | Registrar | Concurrency Verified | [`ALIAS`](functions/domain/ALIAS.md) | [`CAA`](functions/domain/CAA.md) | [`AUTODNSSEC`](functions/domain/AUTODNSSEC_ON.md) | [`LOC`](functions/domain/LOC.md) | [`NAPTR`](functions/domain/NAPTR.md) | [`PTR`](functions/domain/PTR.md) | [`SOA`](functions/domain/SOA.md) | [`SRV`](functions/domain/SRV.md) | [`SSHFP`](functions/domain/SSHFP.md) | [`TLSA`](functions/domain/TLSA.md) | [`DS`](functions/domain/DS.md) | [`DHCID`](functions/domain/DHCID.md) | [`DNAME`](functions/domain/DNAME.md) | dual host | create-domains | get-zones | -| ------------- | ---------------- | ------------ | --------- | -------------------- | ------------------------------------ | -------------------------------- | ------------------------------------------------- | -------------------------------- | ------------------------------------ | -------------------------------- | -------------------------------- | -------------------------------- | ------------------------------------ | ---------------------------------- | ------------------------------ | ------------------------------------ | ------------------------------------ | --------- | -------------- | --------- | +| Provider name | Official Support | DNS Provider | Registrar | Concurrency Verified | [`ALIAS`](language-reference/domain-modifiers/ALIAS.md) | [`CAA`](language-reference/domain-modifiers/CAA.md) | [`AUTODNSSEC`](language-reference/domain-modifiers/AUTODNSSEC_ON.md) | [`LOC`](language-reference/domain-modifiers/LOC.md) | [`NAPTR`](language-reference/domain-modifiers/NAPTR.md) | [`PTR`](language-reference/domain-modifiers/PTR.md) | [`SOA`](language-reference/domain-modifiers/SOA.md) | [`SRV`](language-reference/domain-modifiers/SRV.md) | [`SSHFP`](language-reference/domain-modifiers/SSHFP.md) | [`TLSA`](language-reference/domain-modifiers/TLSA.md) | [`DS`](language-reference/domain-modifiers/DS.md) | [`DHCID`](language-reference/domain-modifiers/DHCID.md) | [`DNAME`](language-reference/domain-modifiers/DNAME.md) | dual host | create-domains | get-zones | +| ------------- | ---------------- | ------------ | --------- | -------------------- | ------------------------------------------------------- | --------------------------------------------------- | -------------------------------------------------------------------- | --------------------------------------------------- | ------------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | ------------------------------------------------------- | ----------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | --------- | -------------- | --------- | | [`AKAMAIEDGEDNS`](providers/akamaiedgedns.md) | ❌ | ✅ | ❌ | ❌ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | ❌ | ❔ | ❔ | ✅ | ✅ | ✅ | | [`AUTODNS`](providers/autodns.md) | ❌ | ✅ | ❌ | ❌ | ✅ | ✅ | ❔ | ❔ | ❔ | ❌ | ❔ | ✅ | ❌ | ❌ | ❌ | ❔ | ❔ | ❌ | ❌ | ✅ | | [`AXFRDDNS`](providers/axfrddns.md) | ❌ | ✅ | ❌ | ❌ | ❔ | ✅ | ✅ | ❔ | ✅ | ✅ | ❔ | ✅ | ✅ | ✅ | ❔ | ✅ | ❔ | ❌ | ❌ | ❌ | diff --git a/documentation/providers/route53.md b/documentation/providers/route53.md index 7f1402c1d..23bd5fa95 100644 --- a/documentation/providers/route53.md +++ b/documentation/providers/route53.md @@ -80,10 +80,10 @@ D("example.com", REG_NONE, DnsProvider(DSP_R53), ## Split horizon -This provider supports split horizons using the [`R53_ZONE()`](../functions/record/R53_ZONE.md) domain function. +This provider supports split horizons using the [`R53_ZONE()`](../language-reference/record-modifiers/R53_ZONE.md) domain function. In this example the domain `testzone.net` appears in the same account twice, -each with different zone IDs specified using [`R53_ZONE()`](../functions/record/R53_ZONE.md). +each with different zone IDs specified using [`R53_ZONE()`](../language-reference/record-modifiers/R53_ZONE.md). {% code title="dnsconfig.js" %} ```javascript diff --git a/documentation/providers/transip.md b/documentation/providers/transip.md index a05e10e9c..5dbfe22b9 100644 --- a/documentation/providers/transip.md +++ b/documentation/providers/transip.md @@ -64,7 +64,7 @@ TransIP depends on a TransIP personal access token. > "When multiple or none of the current DNS entries matches, the response will be an error with http status code 406." — _[TransIP - REST API - Update single DNS entry](https://api.transip.nl/rest/docs.html#domains-dns-patch)_ -This makes it not possible, for example, to update a [`CAA()`](../functions/domain/CAA.md) record in one update. Instead, the old DNS entry is deleted and the replacement is added. You'll see `[1/2]` and `[2/2]` in the DNSControl output whenever this happens. +This makes it not possible, for example, to update a [`CAA()`](../language-reference/domain-modifiers/CAA.md) record in one update. Instead, the old DNS entry is deleted and the replacement is added. You'll see `[1/2]` and `[2/2]` in the DNSControl output whenever this happens. ### Example with a `CAA_BUILDER()` diff --git a/documentation/styleguide-doc.md b/documentation/styleguide-doc.md index aff60131f..3b523d2e5 100644 --- a/documentation/styleguide-doc.md +++ b/documentation/styleguide-doc.md @@ -23,7 +23,7 @@ Within the git repo, docs are grouped: * [`documentation/`](https://github.com/StackExchange/dnscontrol/tree/main/documentation): general docs * [`documentation/providers/`](https://github.com/StackExchange/dnscontrol/tree/main/documentation/providers/): One file per provider -* [`documentation/functions/`](https://github.com/StackExchange/dnscontrol/tree/main/documentation/functions/): One file per `dnsconfig.js` language feature +* [`documentation/language-reference/`](https://github.com/StackExchange/dnscontrol/tree/main/documentation/language-reference/): One file per `dnsconfig.js` language feature * [`documentation/assets/FOO/`](https://github.com/StackExchange/dnscontrol/tree/main/documentation/assets/): Images for page FOO(PNGs only, please!) ## How to add a new page? @@ -33,10 +33,10 @@ Within the git repo, docs are grouped: ## Top-of-Document parameters -Files in the `documentation/functions/{record,domain,global}` subdirectories +Files in the `documentation/language-reference/{record,domain,global}` subdirectories have a header at the top that is used to populate other systems. -Here's an example from [`A`](functions/domain/A.md) +Here's an example from [`A`](language-reference/domain-modifiers/A.md) ``` --- @@ -193,7 +193,7 @@ However, the first mention on a page should always be a link. Others are at the authors digression. ```markdown -The [`PTR`](functions/domain/PTR.md) feature is helpful in LANs. +The [`PTR`](language-reference/domain-modifiers/PTR.md) feature is helpful in LANs. ``` #### Mentioning functions from the Source code @@ -207,7 +207,7 @@ The function `GetRegistrarCorrections()` returns... #### Internal links ```markdown -Blah blah blah [M365_BUILDER](functions/domain/M365_BUILDER.md) +Blah blah blah [M365_BUILDER](language-reference/domain-modifiers/M365_BUILDER.md) ``` {% hint style="info" %} diff --git a/documentation/writing-providers.md b/documentation/writing-providers.md index c273cc8fe..425bf012e 100644 --- a/documentation/writing-providers.md +++ b/documentation/writing-providers.md @@ -10,7 +10,7 @@ assigned bugs related to the provider in the future (unless you designate someone else as the maintainer). More details [here](providers.md). -Please follow the [DNSControl Code Style Guide](https://docs.dnscontrol.org/developer-info/styleguide-code) and the [DNSControl Documentation Style Guide](https://docs.dnscontrol.org/developer-info/styleguide-doc). +Please follow the [DNSControl Code Style Guide](styleguide-code.md) and the [DNSControl Documentation Style Guide](styleguide-doc.md). ## Overview diff --git a/pkg/js/parse_tests/030-dextenddoc.js b/pkg/js/parse_tests/030-dextenddoc.js index 64e4ca06f..56f43e4cd 100644 --- a/pkg/js/parse_tests/030-dextenddoc.js +++ b/pkg/js/parse_tests/030-dextenddoc.js @@ -1,7 +1,7 @@ var REG = NewRegistrar("Third-Party", "NONE"); var DNS = NewDnsProvider("Cloudflare", "CLOUDFLAREAPI"); -// The example from docs/functions/global/D_EXTEND.md +// The example from documentation/language-reference/top-level-functions/D_EXTEND.md D("domain.tld", REG, DnsProvider(DNS), A("@", "127.0.0.1"), // domain.tld