From ee4970471b02336eb6cab8221eed73c6eafc4e6b Mon Sep 17 00:00:00 2001 From: Jeffrey Cafferata Date: Tue, 17 Dec 2024 13:46:37 +0100 Subject: [PATCH] DOCS: Trailing commas are no longer an issue (#3248) --- commands/types/dnscontrol.d.ts | 214 +++++++++--------- documentation/ci-cd-gitlab.md | 2 +- documentation/cli-variables.md | 8 +- documentation/code-tricks.md | 61 +---- documentation/examples.md | 22 +- documentation/getting-started.md | 2 +- .../language-reference/domain-modifiers/A.md | 2 +- .../domain-modifiers/AAAA.md | 2 +- .../domain-modifiers/ALIAS.md | 2 +- .../domain-modifiers/AUTODNSSEC_ON.md | 4 +- .../domain-modifiers/AZURE_ALIAS.md | 2 +- .../domain-modifiers/CAA.md | 2 +- .../domain-modifiers/CAA_BUILDER.md | 8 +- .../domain-modifiers/CF_REDIRECT.md | 2 +- .../domain-modifiers/CF_SINGLE_REDIRECT.md | 2 +- .../domain-modifiers/CF_TEMP_REDIRECT.md | 2 +- .../domain-modifiers/CF_WORKER_ROUTE.md | 2 +- .../domain-modifiers/CNAME.md | 2 +- .../domain-modifiers/DHCID.md | 2 +- .../domain-modifiers/DMARC_BUILDER.md | 6 +- .../domain-modifiers/DNAME.md | 2 +- .../domain-modifiers/DNSKEY.md | 2 +- .../language-reference/domain-modifiers/DS.md | 2 +- .../domain-modifiers/DefaultTTL.md | 2 +- .../domain-modifiers/HTTPS.md | 2 +- .../domain-modifiers/IGNORE.md | 38 ++-- .../domain-modifiers/IMPORT_TRANSFORM.md | 6 +- .../domain-modifiers/INCLUDE.md | 4 +- .../domain-modifiers/LOC.md | 2 +- .../domain-modifiers/LOC_BUILDER_DD.md | 2 +- .../domain-modifiers/LOC_BUILDER_DMM_STR.md | 2 +- .../domain-modifiers/LOC_BUILDER_DMS_STR.md | 2 +- .../domain-modifiers/LOC_BUILDER_STR.md | 2 +- .../domain-modifiers/M365_BUILDER.md | 4 +- .../language-reference/domain-modifiers/MX.md | 2 +- .../domain-modifiers/NAMESERVER.md | 6 +- .../domain-modifiers/NAMESERVER_TTL.md | 4 +- .../domain-modifiers/NAPTR.md | 8 +- .../domain-modifiers/NO_PURGE.md | 2 +- .../language-reference/domain-modifiers/NS.md | 2 +- .../domain-modifiers/PTR.md | 12 +- .../domain-modifiers/PURGE.md | 4 +- .../domain-modifiers/R53_ALIAS.md | 2 +- .../domain-modifiers/SOA.md | 2 +- .../domain-modifiers/SPF_BUILDER.md | 10 +- .../domain-modifiers/SRV.md | 2 +- .../domain-modifiers/SSHFP.md | 2 +- .../domain-modifiers/SVCB.md | 2 +- .../domain-modifiers/TLSA.md | 2 +- .../domain-modifiers/TXT.md | 2 +- .../record-modifiers/TTL.md | 2 +- .../top-level-functions/D.md | 10 +- .../top-level-functions/DEFAULTS.md | 6 +- .../top-level-functions/DOMAIN_ELSEWHERE.md | 2 +- .../DOMAIN_ELSEWHERE_AUTO.md | 2 +- .../top-level-functions/D_EXTEND.md | 10 +- .../top-level-functions/FETCH.md | 2 +- .../top-level-functions/NewDnsProvider.md | 4 +- .../top-level-functions/NewRegistrar.md | 4 +- .../top-level-functions/REV.md | 4 +- .../top-level-functions/require.md | 2 +- .../dnsconfig-code-example-with-filename.md | 2 +- documentation/nameservers.md | 20 +- documentation/notifications.md | 2 +- documentation/provider/akamaiedgedns.md | 2 +- documentation/provider/autodns.md | 2 +- documentation/provider/azure_dns.md | 2 +- documentation/provider/azure_private_dns.md | 4 +- documentation/provider/bunny_dns.md | 2 +- documentation/provider/cloudflareapi.md | 10 +- documentation/provider/cloudns.md | 4 +- documentation/provider/cnr.md | 2 +- documentation/provider/cscglobal.md | 2 +- documentation/provider/desec.md | 4 +- documentation/provider/digitalocean.md | 2 +- documentation/provider/dnsimple.md | 2 +- documentation/provider/dnsmadeeasy.md | 2 +- documentation/provider/dnsoverhttps.md | 2 +- documentation/provider/domainnameshop.md | 2 +- documentation/provider/easyname.md | 2 +- documentation/provider/exoscale.md | 2 +- documentation/provider/gandi_v5.md | 2 +- documentation/provider/gcloud.md | 4 +- documentation/provider/gcore.md | 4 +- documentation/provider/hedns.md | 2 +- documentation/provider/hetzner.md | 2 +- documentation/provider/hexonet.md | 2 +- documentation/provider/hostingde.md | 2 +- documentation/provider/huaweicloud.md | 4 +- documentation/provider/internetbs.md | 2 +- documentation/provider/inwx.md | 2 +- documentation/provider/linode.md | 2 +- documentation/provider/loopia.md | 18 +- documentation/provider/luadns.md | 2 +- documentation/provider/msdns.md | 2 +- documentation/provider/mythicbeasts.md | 2 +- documentation/provider/namecheap.md | 4 +- documentation/provider/namedotcom.md | 4 +- documentation/provider/netcup.md | 2 +- documentation/provider/netlify.md | 2 +- documentation/provider/ns1.md | 2 +- documentation/provider/opensrs.md | 2 +- documentation/provider/oracle.md | 2 +- documentation/provider/ovh.md | 4 +- documentation/provider/packetframe.md | 2 +- documentation/provider/porkbun.md | 2 +- documentation/provider/powerdns.md | 2 +- documentation/provider/realtimeregister.md | 2 +- documentation/provider/route53.md | 6 +- documentation/provider/rwth.md | 2 +- documentation/provider/sakuracloud.md | 2 +- documentation/provider/softlayer.md | 4 +- documentation/provider/transip.md | 2 +- documentation/provider/vultr.md | 2 +- documentation/styleguide-doc.md | 2 +- 115 files changed, 329 insertions(+), 378 deletions(-) diff --git a/commands/types/dnscontrol.d.ts b/commands/types/dnscontrol.d.ts index 2315a8424b..fdb6a9dd50 100644 --- a/commands/types/dnscontrol.d.ts +++ b/commands/types/dnscontrol.d.ts @@ -51,7 +51,7 @@ type Duration = * ```javascript * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * A("@", "1.2.3.4"), - * END); + * ); * * FETCH("https://example.com", { * // All three options below are optional @@ -191,7 +191,7 @@ declare const DISABLE_REPEATED_DOMAIN_CHECK: RecordModifier; * A("foo", "2.3.4.5"), * A("test.foo", IP("1.2.3.4"), TTL(5000)), * A("*", "1.2.3.4", {foo: 42}), - * END); + * ); * ``` * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/a @@ -213,7 +213,7 @@ declare function A(name: string, address: string | number, ...modifiers: RecordM * AAAA("foo", addrV6), * AAAA("test.foo", addrV6, TTL(5000)), * AAAA("*", addrV6, {foo: 42}), - * END); + * ); * ``` * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/aaaa @@ -240,7 +240,7 @@ declare function AKAMAICDN(name: string, target: string, ...modifiers: RecordMod * ```javascript * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * ALIAS("@", "google.com."), // example.com -> google.com - * END); + * ); * ``` * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/alias @@ -277,12 +277,12 @@ declare const AUTODNSSEC_OFF: DomainModifier; * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * AUTODNSSEC_ON, // Enable AutoDNSSEC. * A("@", "10.1.1.1"), - * END); + * ); * * D("insecure.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * AUTODNSSEC_OFF, // Disable AutoDNSSEC. * A("@", "10.2.2.2"), - * END); + * ); * ``` * * If neither `AUTODNSSEC_ON` or `AUTODNSSEC_OFF` is specified for a @@ -332,7 +332,7 @@ declare const AUTODNSSEC_ON: DomainModifier; * D("example.com", REG_MY_PROVIDER, DnsProvider("AZURE_DNS"), * AZURE_ALIAS("foo", "A", "/subscriptions/726f8cd6-6459-4db4-8e6d-2cd2716904e2/resourceGroups/test/providers/Microsoft.Network/trafficManagerProfiles/testpp2"), // record for traffic manager * AZURE_ALIAS("foo", "CNAME", "/subscriptions/726f8cd6-6459-4db4-8e6d-2cd2716904e2/resourceGroups/test/providers/Microsoft.Network/dnszones/example.com/A/quux."), // record in the same zone - * END); + * ); * ``` * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/service-provider-specific/azure-dns/azure_alias @@ -361,7 +361,7 @@ declare function AZURE_ALIAS(name: string, type: "A" | "AAAA" | "CNAME", target: * // Report all violation to test@example.com. If CA does not support * // this record then refuse to issue any certificate * CAA("@", "iodef", "mailto:test@example.com", CAA_CRITICAL), - * END); + * ); * ``` * * DNSControl contains a [`CAA_BUILDER`](CAA_BUILDER.md) which can be used to simply create `CAA()` records for your domains. Instead of creating each CAA record individually, you can simply configure your report mail address, the authorized certificate authorities and the builder cares about the rest. @@ -392,7 +392,7 @@ declare function CAA(name: string, tag: "issue" | "issuewild" | "iodef", value: * ], * issuewild: "none", * }), - * END); + * ); * ``` * * `CAA_BUILDER()` builds multiple records: @@ -403,7 +403,7 @@ declare function CAA(name: string, tag: "issue" | "issuewild" | "iodef", value: * CAA("@", "issue", "letsencrypt.org"), * CAA("@", "issue", "comodoca.com"), * CAA("@", "issuewild", ";"), - * END); + * ); * ``` * * which in turns yield the following records: @@ -433,7 +433,7 @@ declare function CAA(name: string, tag: "issue" | "issuewild" | "iodef", value: * issuewild: "none", * issuewild_critical: true, * }), - * END); + * ); * ``` * * `CAA_BUILDER()` then builds (the same) multiple records - all with CAA_CRITICAL flag set: @@ -444,7 +444,7 @@ declare function CAA(name: string, tag: "issue" | "issuewild" | "iodef", value: * CAA("@", "issue", "letsencrypt.org", CAA_CRITICAL), * CAA("@", "issue", "comodoca.com", CAA_CRITICAL), * CAA("@", "issuewild", ";", CAA_CRITICAL), - * END); + * ); * ``` * * which in turns yield the following records: @@ -500,7 +500,7 @@ declare function CAA_BUILDER(opts: { label?: string; iodef: string; iodef_critic * ```javascript * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * CF_REDIRECT("example.com/*", "https://www.example.com/$1"), - * END); + * ); * ``` * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/service-provider-specific/cloudflare-dns/cf_redirect @@ -521,7 +521,7 @@ declare function CF_REDIRECT(source: string, destination: string, ...modifiers: * CF_SINGLE_REDIRECT("name", 301, "when", "then"), * CF_SINGLE_REDIRECT('redirect www.example.com', 301, 'http.host eq "www.example.com"', 'concat("https://otherplace.com", http.request.uri.path)'), * CF_SINGLE_REDIRECT('redirect yyy.example.com', 301, 'http.host eq "yyy.example.com"', 'concat("https://survey.stackoverflow.co", "")'), - * END); + * ); * ``` * * The fields are: @@ -559,7 +559,7 @@ declare function CF_SINGLE_REDIRECT(name: string, code: number, when: string, th * ```javascript * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * CF_TEMP_REDIRECT("example.example.com/*", "https://otherplace.yourdomain.com/$1"), - * END); + * ); * ``` * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/service-provider-specific/cloudflare-dns/cf_temp_redirect @@ -585,7 +585,7 @@ declare function CF_TEMP_REDIRECT(source: string, destination: string, ...modifi * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * CF_WORKER_ROUTE("api.example.com/*", "my-worker"), * CF_WORKER_ROUTE("example.com/api/*", "my-worker"), - * END); + * ); * ``` * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/service-provider-specific/cloudflare-dns/cf_worker_route @@ -610,7 +610,7 @@ declare function CLOUDNS_WR(name: string, target: string, ...modifiers: RecordMo * CNAME("foo", "google.com."), // foo.example.com -> google.com * CNAME("abc", "@"), // abc.example.com -> example.com * CNAME("def", "test"), // def.example.com -> test.example.com - * END); + * ); * ``` * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/cname @@ -634,7 +634,7 @@ declare function CNAME(name: string, target: string, ...modifiers: RecordModifie * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * A("@","1.2.3.4"), * CNAME("test", "foo.example2.com."), - * END); + * ); * * // "macro" for records that can be mixed into any zone * var GOOGLE_APPS_DOMAIN_MX = [ @@ -649,7 +649,7 @@ declare function CNAME(name: string, target: string, ...modifiers: RecordModifie * A("@","1.2.3.4"), * CNAME("test", "foo.example2.com."), * GOOGLE_APPS_DOMAIN_MX, - * END); + * ); * ``` * * # Split Horizon DNS @@ -669,15 +669,15 @@ declare function CNAME(name: string, target: string, ...modifiers: RecordModifie * * D("example.com!inside", REG_THIRDPARTY, DnsProvider(DNS_INSIDE), * A("www", "10.10.10.10"), - * END); + * ); * * D("example.com!outside", REG_THIRDPARTY, DnsProvider(DNS_OUTSIDE), * A("www", "20.20.20.20"), - * END); + * ); * * D_EXTEND("example.com!inside", * A("internal", "10.99.99.99"), - * END); + * ); * ``` * * A domain name without a `!` is assigned a tag that is the empty @@ -718,11 +718,11 @@ declare function D(name: string, registrar: string, ...modifiers: DomainModifier * DEFAULTS( * DnsProvider(COMMON, 0), * DefaultTTL("1d"), - * END); + * ); * * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * A("@","1.2.3.4"), - * END); + * ); * ``` * * If you want to clear the defaults, you can do the following. @@ -733,7 +733,7 @@ declare function D(name: string, registrar: string, ...modifiers: DomainModifier * * D("example2.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * A("@","1.2.3.4"), - * END); + * ); * ``` * * @see https://docs.dnscontrol.org/language-reference/top-level-functions/defaults @@ -748,7 +748,7 @@ declare function DEFAULTS(...modifiers: DomainModifier[]): void; * ```javascript * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * DHCID("example.com", "ABCDEFG"), - * END); + * ); * ``` * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/dhcid @@ -796,7 +796,7 @@ declare const DISABLE_IGNORE_SAFETY_CHECK: DomainModifier; * "mailto:mailauth-reports@example.com", * ], * }), - * END); + * ); * ``` * * This yield the following record: @@ -825,7 +825,7 @@ declare const DISABLE_IGNORE_SAFETY_CHECK: DomainModifier; * failureOptions: "1", * reportInterval: "1h", * }), - * END); + * ); * ``` * * ```javascript @@ -841,7 +841,7 @@ declare const DISABLE_IGNORE_SAFETY_CHECK: DomainModifier; * DKIM: true, * }, * }), - * END); + * ); * ``` * * This yields the following records: @@ -884,7 +884,7 @@ declare function DMARC_BUILDER(opts: { label?: string; version?: string; policy: * ```javascript * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * DNAME("sub", "example.net."), - * END); + * ); * ``` * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/dname @@ -905,7 +905,7 @@ declare function DNAME(name: string, target: string, ...modifiers: RecordModifie * ```javascript * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * DNSKEY("@", 257, 3, 13, "AABBCCDD"), - * END); + * ); * ``` * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/dnskey @@ -935,7 +935,7 @@ declare function DNSKEY(name: string, flags: number, protocol: number, algorithm * NO_PURGE, * NAMESERVER("ns1.foo.com"), * NAMESERVER("ns2.foo.com"), - * END); + * ); * ``` * * NOTE: The [`NO_PURGE`](../domain-modifiers/NO_PURGE.md) is used out of abundance of caution but since no @@ -970,7 +970,7 @@ declare function DOMAIN_ELSEWHERE(name: string, registrar: string, nameserver_na * D("example.com", REG_NAMEDOTCOM, * NO_PURGE, * DnsProvider(DSP_AZURE), - * END); + * ); * ``` * * NOTE: The [`NO_PURGE`](../domain-modifiers/NO_PURGE.md) is used to prevent DNSControl from changing the records. @@ -993,7 +993,7 @@ declare function DOMAIN_ELSEWHERE_AUTO(name: string, domain: string, registrar: * ```javascript * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * DS("example.com", 2371, 13, 2, "ABCDEF"), - * END); + * ); * ``` * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/ds @@ -1031,24 +1031,24 @@ declare function DS(name: string, keytag: number, algorithm: number, digesttype: * A("@", "127.0.0.1"), // domain.tld * A("www", "127.0.0.2"), // www.domain.tld * CNAME("a", "b"), // a.domain.tld -> b.domain.tld - * END); + * ); * D_EXTEND("domain.tld", * A("aaa", "127.0.0.3"), // aaa.domain.tld * CNAME("c", "d"), // c.domain.tld -> d.domain.tld - * END); + * ); * D_EXTEND("sub.domain.tld", * A("bbb", "127.0.0.4"), // bbb.sub.domain.tld * A("ccc", "127.0.0.5"), // ccc.sub.domain.tld * CNAME("e", "f"), // e.sub.domain.tld -> f.sub.domain.tld - * END); + * ); * D_EXTEND("sub.sub.domain.tld", * A("ddd", "127.0.0.6"), // ddd.sub.sub.domain.tld * CNAME("g", "h"), // g.sub.sub.domain.tld -> h.sub.sub.domain.tld - * END); + * ); * D_EXTEND("sub.domain.tld", * A("@", "127.0.0.7"), // sub.domain.tld * CNAME("i", "j"), // i.sub.domain.tld -> j.sub.domain.tld - * END); + * ); * ``` * * This will end up in the following modifications: (This output assumes the `--full` flag) @@ -1095,7 +1095,7 @@ declare function D_EXTEND(name: string, ...modifiers: DomainModifier[]): void; * DefaultTTL("4h"), * A("@","1.2.3.4"), // uses default * A("foo", "2.3.4.5", TTL(600)), // overrides default - * END); + * ); * ``` * * The DefaultTTL duration is the same format as [`TTL`](../record-modifiers/TTL.md), an integer number of seconds @@ -1178,7 +1178,7 @@ declare function HASH(algorithm: "SHA1" | "SHA256" | "SHA512", value: string): s * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * HTTPS("@", 1, ".", "ipv4hint=123.123.123.123 alpn=h3,h2 port=443"), * HTTPS("@", 1, "test.com", ""), - * END); + * ); * ``` * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/https @@ -1217,7 +1217,7 @@ declare function HTTPS(name: string, priority: number, target: string, params: s * IGNORE(labelSpec, typeSpec, targetSpec), * IGNORE(labelSpec, typeSpec), * IGNORE(labelSpec), - * END); + * ); * ``` * * * `labelSpec` is a glob that matches the DNS label. For example `"foo"` or `"foo*"`. `"*"` matches all labels, as does the empty string (`""`). @@ -1253,7 +1253,7 @@ declare function HTTPS(name: string, priority: number, target: string, params: s * IGNORE("bar", "A,MX"), // ignore only A and MX records for name bar * IGNORE("*", "*", "dev-*"), // Ignore targets with a `dev-` prefix * IGNORE("*", "A", "1\.2\.3\."), // Ignore targets in the 1.2.3.0/24 CIDR block - * END); + * ); * ``` * * Ignore Let's Encrypt (ACME) validation records: @@ -1262,7 +1262,7 @@ declare function HTTPS(name: string, priority: number, target: string, params: s * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * IGNORE("_acme-challenge", "TXT"), * IGNORE("_acme-challenge.**", "TXT"), - * END); + * ); * ``` * * Ignore DNS records typically inserted by Microsoft ActiveDirectory: @@ -1285,7 +1285,7 @@ declare function HTTPS(name: string, priority: number, target: string, params: s * IGNORE("domaindnszones.**", "A"), * IGNORE("forestdnszones", "A"), * IGNORE("forestdnszones.**", "A"), - * END); + * ); * ``` * * ## Detailed examples @@ -1306,7 +1306,7 @@ declare function HTTPS(name: string, priority: number, target: string, params: s * CNAME("cfull", "www.plts.org."), * CNAME("cfull2", "www.bar.plts.org."), * CNAME("cfull3", "bar.www.plts.org."), - * END); + * ); * * D_EXTEND("more.example.com", * A("foo", "1.1.1.1"), @@ -1315,13 +1315,13 @@ declare function HTTPS(name: string, priority: number, target: string, params: s * CNAME("mfull", "www.plts.org."), * CNAME("mfull2", "www.bar.plts.org."), * CNAME("mfull3", "bar.www.plts.org."), - * END); + * ); * ``` * * ```javascript * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * IGNORE("@", "", ""), - * END); + * ); * ``` * * **Would match**: @@ -1332,7 +1332,7 @@ declare function HTTPS(name: string, priority: number, target: string, params: s * ```javascript * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * IGNORE("example.com.", "", ""), - * END); + * ); * ``` * * **Would match**: @@ -1342,7 +1342,7 @@ declare function HTTPS(name: string, priority: number, target: string, params: s * ```javascript * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * IGNORE("foo", "", ""), - * END); + * ); * ``` * * **Would match**: @@ -1352,7 +1352,7 @@ declare function HTTPS(name: string, priority: number, target: string, params: s * ```javascript * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * IGNORE("foo.**", "", ""), - * END); + * ); * ``` * * **Would match**: @@ -1362,14 +1362,14 @@ declare function HTTPS(name: string, priority: number, target: string, params: s * ```javascript * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * IGNORE("www", "", ""), - * END); + * ); * // www.example.com. A 174.136.107.196 * ``` * * ```javascript * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * IGNORE("www.*", "", ""), - * END); + * ); * // nothing * ``` * @@ -1380,7 +1380,7 @@ declare function HTTPS(name: string, priority: number, target: string, params: s * ```javascript * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * IGNORE("www.example.com", "", ""), - * END); + * ); * // nothing * ``` * @@ -1391,7 +1391,7 @@ declare function HTTPS(name: string, priority: number, target: string, params: s * ```javascript * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * IGNORE("www.example.com.", "", ""), - * END); + * ); * ``` * * **Would match**: @@ -1401,7 +1401,7 @@ declare function HTTPS(name: string, priority: number, target: string, params: s * ```javascript * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * //IGNORE("", "", "1.1.1.*"), - * END); + * ); * ``` * * **Would match**: @@ -1412,7 +1412,7 @@ declare function HTTPS(name: string, priority: number, target: string, params: s * ```javascript * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * //IGNORE("", "", "www"), - * END); + * ); * ``` * * **Would match**: @@ -1422,7 +1422,7 @@ declare function HTTPS(name: string, priority: number, target: string, params: s * ```javascript * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * IGNORE("", "", "*bar*"), - * END); + * ); * ``` * * **Would match**: @@ -1435,7 +1435,7 @@ declare function HTTPS(name: string, priority: number, target: string, params: s * ```javascript * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * IGNORE("", "", "bar.**"), - * END); + * ); * ``` * * **Would match**: @@ -1481,7 +1481,7 @@ declare function HTTPS(name: string, priority: number, target: string, params: s * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * // THIS NO LONGER WORKS! Use DISABLE_IGNORE_SAFETY_CHECK instead. See above. * TXT("myhost", "mytext", IGNORE_NAME_DISABLE_SAFETY_CHECK), - * END); + * ); * ``` * * ## Caveats @@ -1522,12 +1522,12 @@ declare function IGNORE_TARGET(pattern: string, rType: string): DomainModifier; * ```javascript * D("example.com!external", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * A("test", "8.8.8.8"), - * END); + * ); * * D("example.com!internal", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * INCLUDE("example.com!external"), * A("home", "127.0.0.1"), - * END); + * ); * ``` * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/include @@ -1648,7 +1648,7 @@ declare function IP(ip: string): number; * LOC("c", 32, 7, 19, "S",116, 2, 25, "E", 10, 0, 0, 0), * //42 21 28.764 N 71 00 51.617 W -44m 2000m * LOC("d", 42, 21, 28.764, "N", 71, 0, 51.617, "W", -44, 2000, 0, 0), - * END); + * ); * ``` * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/loc @@ -1699,7 +1699,7 @@ declare function LOC(deg1: number, min1: number, sec1: number, deg2: number, min * alt: 19, * ttl: "5m", * }), - * END); + * ); * ``` * * Part of the series: @@ -1740,7 +1740,7 @@ declare function LOC_BUILDER_DD(opts: { label?: string; x: number; y: number; al * str: "42°S 147°E", * alt: 3, * }), - * END); + * ); * ``` * * Part of the series: @@ -1782,7 +1782,7 @@ declare function LOC_BUILDER_DMM_STR(opts: { label?: string; str: string; alt?: * alt: 4, * ttl: "5m", * }), - * END); + * ); * ``` * * Part of the series: @@ -1829,7 +1829,7 @@ declare function LOC_BUILDER_DMS_STR(opts: { label?: string; str: string; alt?: * str: "53°20′40″N 6°17′20″W", * alt: 300, * }), - * END); + * ); * ``` * * Part of the series: @@ -1858,7 +1858,7 @@ declare function LOC_BUILDER_STR(opts: { label?: string; str: string; alt?: numb * M365_BUILDER("example.com", { * initialDomain: "example.onmicrosoft.com", * }), - * END); + * ); * ``` * * This sets up `MX` records, Autodiscover, and DKIM. @@ -1876,7 +1876,7 @@ declare function LOC_BUILDER_STR(opts: { label?: string; str: string; alt?: numb * domainGUID: "test-example-com", // Can be automatically derived in this case, if example.com is the context. * initialDomain: "example.onmicrosoft.com", * }), - * END); + * ); * ``` * * This sets up Mobile Device Management only. @@ -1907,7 +1907,7 @@ declare function M365_BUILDER(opts: { label?: string; mx?: boolean; autodiscover * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * MX("@", 5, "mail"), // mx example.com -> mail.example.com * MX("sub", 10, "mail.foo.com."), - * END); + * ); * ``` * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/mx @@ -1934,13 +1934,13 @@ declare function MX(name: string, priority: number, target: string, ...modifiers * // Replace the nameservers: * NAMESERVER("ns1.myserver.com."), * NAMESERVER("ns2.myserver.com."), - * END); + * ); * * D("example2.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * // Add these two additional nameservers to the existing list of nameservers. * NAMESERVER("ns1.myserver.com."), * NAMESERVER("ns2.myserver.com."), - * END); + * ); * ``` * * # The difference between NS() and NAMESERVER() @@ -1989,7 +1989,7 @@ declare function MX(name: string, priority: number, target: string, ...modifiers * var REG_THIRDPARTY = NewRegistrar("ThirdParty"); * D("example.com", REG_THIRDPARTY, * ... - * END); + * ); * ``` * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/nameserver @@ -2005,7 +2005,7 @@ declare function NAMESERVER(name: string, ...modifiers: RecordModifier[]): Domai * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * NAMESERVER_TTL("2d"), * NAMESERVER("ns"), - * END); + * ); * ``` * * Use `NAMESERVER_TTL("3600"),` or `NAMESERVER_TTL("1h"),` for a 1h default TTL for all subsequent `NS` entries: @@ -2018,7 +2018,7 @@ declare function NAMESERVER(name: string, ...modifiers: RecordModifier[]): Domai * NAMESERVER("ns2.provider.com."), //inherits NAMESERVER_TTL * A("@","1.2.3.4"), // inherits DefaultTTL * A("foo", "2.3.4.5", TTL(600)), // overrides DefaultTTL for this record only - * END); + * ); * ``` * * To apply a default TTL to all other record types, see [`DefaultTTL`](../domain-modifiers/DefaultTTL.md) @@ -2170,7 +2170,7 @@ declare function NAMESERVER_TTL(ttl: Duration): DomainModifier; * NAPTR("8", 10, 10, "u", "E2U+SIP", "!^.*$!sip:mike@example.com!", "."), * NAPTR("9", 10, 10, "u", "E2U+SIP", "!^.*$!sip:linda@example.com!", "."), * NAPTR("0", 10, 10, "u", "E2U+SIP", "!^.*$!sip:fax@example.com!", "."), - * END); + * ); * ``` * * Single e164 zone @@ -2179,7 +2179,7 @@ declare function NAMESERVER_TTL(ttl: Duration): DomainModifier; * NAPTR("@", 100, 50, "u", "E2U+SIP", "!^.*$!sip:customer-service@example.com!", "."), * NAPTR("@", 101, 50, "u", "E2U+email", "!^.*$!mailto:information@example.com!", "."), * NAPTR("@", 101, 50, "u", "smtp+E2U", "!^.*$!mailto:information@example.com!", "."), - * END); + * ); * ``` * * ### Examples for SIP: @@ -2197,7 +2197,7 @@ declare function NAMESERVER_TTL(ttl: Duration): DomainModifier; * A("sip", "192.0.2.2"), * AAAA("sip", "2001:db8::85a3"), * // and so on - * END); + * ); * ``` * * ### Other RFC based examples: @@ -2212,7 +2212,7 @@ declare function NAMESERVER_TTL(ttl: Duration): DomainModifier; * SRV("_z3950._tcp", 0, 0, 1000, "z3950.beast.example.com."), * SRV("_http._tcp", 10, 0, 80, "foo.example.com."), * // and so on - * END); + * ); * ``` * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/naptr @@ -2246,7 +2246,7 @@ declare function NAPTR(subdomain: string, order: number, preference: number, ter * ```javascript * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), NO_PURGE, * A("foo","1.2.3.4"), - * END); + * ); * ``` * * The main caveat of `NO_PURGE` is that intentionally deleting records becomes @@ -2287,7 +2287,7 @@ declare const NO_PURGE: DomainModifier; * NS("foo", "ns2.example2.com."), // Delegate ".foo.example.com" zone to another server. * A("ns1.example2.com", "10.10.10.10"), // Glue records * A("ns2.example2.com", "10.10.10.20"), // Glue records - * END); + * ); * ``` * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/ns @@ -2341,7 +2341,7 @@ declare function NS1_URLFWD(name: string, target: string, ...modifiers: RecordMo * * D("example.com", REG_MYNDC, DnsProvider(DNS_MYAWS), * A("@","1.2.3.4"), - * END); + * ); * ``` * * In [v3.16](../../v316.md) and later: @@ -2352,7 +2352,7 @@ declare function NS1_URLFWD(name: string, target: string, ...modifiers: RecordMo * * D("example.com", REG_MYNDC, DnsProvider(DNS_MYAWS), * A("@","1.2.3.4"), - * END); + * ); * ``` * * @see https://docs.dnscontrol.org/language-reference/top-level-functions/newdnsprovider @@ -2380,7 +2380,7 @@ declare function NewDnsProvider(name: string, type?: string, meta?: object): str * * D("example.com", REG_MYNDC, DnsProvider(DNS_MYAWS), * A("@","1.2.3.4"), - * END); + * ); * ``` * * In [v3.16](../../v316.md) and later: @@ -2391,7 +2391,7 @@ declare function NewDnsProvider(name: string, type?: string, meta?: object): str * * D("example.com", REG_MYNDC, DnsProvider(DNS_MYAWS), * A("@","1.2.3.4"), - * END); + * ); * ``` * * @see https://docs.dnscontrol.org/language-reference/top-level-functions/newregistrar @@ -2488,13 +2488,13 @@ declare function PORKBUN_URLFWD(name: string, target: string, ...modifiers: Reco * PTR("3", "baz.example.com."), * // If the first parameter is a valid IP address, DNSControl will generate the correct name: * PTR("1.2.3.10", "ten.example.com."), // "10" - * END); + * ); * ``` * * ```javascript * D(REV("9.9.9.128/25"), REGISTRAR, DnsProvider(BIND), * PTR("9.9.9.129", "first.example.com."), - * END); + * ); * ``` * * ```javascript @@ -2503,7 +2503,7 @@ declare function PORKBUN_URLFWD(name: string, target: string, ...modifiers: Reco * // If the first parameter is a valid IP address, DNSControl will generate the correct name: * PTR("2001:db8:302::2", "two.example.com."), // "2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0" * PTR("2001:db8:302::3", "three.example.com."), // "3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0" - * END); + * ); * ``` * * # Automatic forward and reverse lookups @@ -2525,10 +2525,10 @@ declare function PORKBUN_URLFWD(name: string, target: string, ...modifiers: Reco * * D("example.com", REGISTRAR, DnsProvider(DSP_NONE), * ..., - * END); + * ); * D(REV("10.20.30.0/24"), REGISTRAR, DnsProvider(DSP_NONE), * ..., - * END); + * ); * * FORWARD_AND_REVERSE("10.20.30.77", "foo.example.com."); * FORWARD_AND_REVERSE("10.20.30.99", "bar.example.com."); @@ -2559,7 +2559,7 @@ declare function PTR(name: string, target: string, ...modifiers: RecordModifier[ * ```javascript * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * PURGE, - * END); + * ); * ``` * * Since the "last command wins", this is the same as `PURGE`: @@ -2571,7 +2571,7 @@ declare function PTR(name: string, target: string, ...modifiers: RecordModifier[ * PURGE, * NO_PURGE, * PURGE, - * END); + * ); * ``` * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/purge @@ -2614,7 +2614,7 @@ declare const PURGE: DomainModifier; * R53_ALIAS("foo", "A", "blahblah.elasticloadbalancing.us-west-1.amazonaws.com.", R53_ZONE("Z368ELLRRE2KJ0"), R53_EVALUATE_TARGET_HEALTH(true)), // a classic ELB in us-west-1 with target health evaluation enabled * R53_ALIAS("foo", "A", "blahblah.elasticbeanstalk.us-west-2.amazonaws.com.", R53_ZONE("Z38NKT9BP95V3O")), // an Elastic Beanstalk environment in us-west-2 * R53_ALIAS("foo", "A", "blahblah-bucket.s3-website-us-west-1.amazonaws.com.", R53_ZONE("Z2F56UZL2M1ACD")), // a website S3 Bucket in us-west-1 - * END); + * ); * ``` * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/service-provider-specific/amazon-route-53/r53_alias @@ -2690,14 +2690,14 @@ declare function R53_ZONE(zone_id: string): DomainModifier & RecordModifier; * PTR("3", "baz.example.com."), * // If the first parameter is an IP address, DNSControl automatically calls REV() for you. * PTR("1.2.3.10", "ten.example.com."), - * END); + * ); * * D(REV("2001:db8:302::/48"), REGISTRAR, DnsProvider(BIND), * PTR("1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0", "foo.example.com."), // 2001:db8:302::1 * // If the first parameter is an IP address, DNSControl automatically calls REV() for you. * PTR("2001:db8:302::2", "two.example.com."), // 2.0.0... * PTR("2001:db8:302::3", "three.example.com."), // 3.0.0... - * END); + * ); * ``` * * # Automatic forward and reverse record generation @@ -2758,7 +2758,7 @@ declare function REVCOMPAT(rfc: string): string; * ```javascript * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * SOA("@", "ns3.example.com.", "hostmaster@example.com", 3600, 600, 604800, 1440), - * END); + * ); * ``` * * If you accidentally include an `@` in the email field DNSControl will quietly @@ -2793,7 +2793,7 @@ declare function SOA(name: string, ns: string, mbox: string, refresh: number, re * ```javascript * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * TXT("v=spf1 ip4:198.252.206.0/24 ip4:192.111.0.0/24 include:_spf.google.com include:mailgun.org include:spf-basic.fogcreek.com include:mail.zendesk.com include:servers.mcsv.net include:sendgrid.net include:450622.spf05.hubspotemail.net ~all"), - * END) + * ); * ``` * * This has a few problems: @@ -2831,7 +2831,7 @@ declare function SOA(name: string, ns: string, mbox: string, refresh: number, re * "450622.spf05.hubspotemail.net" // Rationale: Unlikely to change without warning. * ] * }), - * END); + * ); * ``` * * By using the `SPF_BUILDER()` we gain many benefits: @@ -2866,7 +2866,7 @@ declare function SOA(name: string, ns: string, mbox: string, refresh: number, re * }), * ... * ... - * END); + * ); * ``` * * The parameters are: @@ -3050,11 +3050,11 @@ declare function SOA(name: string, ns: string, mbox: string, refresh: number, re * * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * SPF_MYSETTINGS, - * END); + * ); * * D("example2.tld", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * SPF_MYSETTINGS, - * END); + * ); * ``` * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/spf_builder @@ -3072,7 +3072,7 @@ declare function SPF_BUILDER(opts: { label?: string; overflow?: string; overhead * // pr w port, target * SRV("_sip._tcp", 10, 60, 5060, "bigbox.example.com."), * SRV("_sip._tcp", 10, 20, 5060, "smallbox1.example.com."), - * END); + * ); * ``` * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/srv @@ -3105,7 +3105,7 @@ declare function SRV(name: string, priority: number, weight: number, port: numbe * ```javascript * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * SSHFP("@", 1, 1, "00yourAmazingFingerprint00"), - * END); + * ); * ``` * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/sshfp @@ -3124,7 +3124,7 @@ declare function SSHFP(name: string, algorithm: 0 | 1 | 2 | 3 | 4, type: 0 | 1 | * ```javascript * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * SVCB("@", 1, ".", "ipv4hint=123.123.123.123 alpn=h3,h2 port=443"), - * END); + * ); * ``` * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/svcb @@ -3142,7 +3142,7 @@ declare function SVCB(name: string, priority: number, target: string, params: st * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * // Create TLSA record for certificate used on TCP port 443 * TLSA("_443._tcp", 3, 1, 1, "abcdef0"), - * END); + * ); * ``` * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/tlsa @@ -3175,7 +3175,7 @@ declare function TLSA(name: string, usage: number, selector: number, type: numbe * A("foo", "2.3.4.5", TTL(500)), // overrides default * A("demo1", "3.4.5.11", TTL("5d")), // 5 days * A("demo2", "3.4.5.12", TTL("5w")), // 5 weeks - * END); + * ); * ``` * * @see https://docs.dnscontrol.org/language-reference/record-modifiers/ttl @@ -3203,7 +3203,7 @@ declare function TTL(ttl: Duration): RecordModifier; * TXT("quoted", "any "quotes" and escapes? ugh; no worries!"), * TXT("_domainkey", "t=y; o=-;"), // Escapes are done for you automatically. * TXT("long", "X".repeat(300)), // Long strings are split automatically. - * END); + * ); * ``` * * NOTE: In the past, long strings had to be annotated with the keyword diff --git a/documentation/ci-cd-gitlab.md b/documentation/ci-cd-gitlab.md index 676f68cbf9..e42d822d6a 100644 --- a/documentation/ci-cd-gitlab.md +++ b/documentation/ci-cd-gitlab.md @@ -26,7 +26,7 @@ D("cafferata.dev", "v=spf1", "-all" ].join(" ")), -END); +); ``` {% endcode %} diff --git a/documentation/cli-variables.md b/documentation/cli-variables.md index 8086de59c4..2b4324bce0 100644 --- a/documentation/cli-variables.md +++ b/documentation/cli-variables.md @@ -61,7 +61,7 @@ D("example.com", REG_NAMECOM, DnsProvider(DNS_NAMECOM), DnsProvider(DNS_BIND), A("siteb", host01, TTL(1800)), A("sitec", host02, TTL(1800)), A("sited", host02, TTL(1800)), -END); +); ``` {% endcode %} @@ -87,7 +87,7 @@ CLI_DEFAULTS({ D("example.com", REG_EXAMPLE, DnsProvider(DNS_EXAMPLE), A("www", "10.10.10.10"), -END); +); if (emergency) { // Emergency mode: Configure A/B/C using CNAMEs to our alternate site. @@ -96,7 +96,7 @@ if (emergency) { CNAME("a", "a.othersite"), CNAME("b", "b.othersite"), CNAME("c", "c.othersite"), - END); + ); } else { // Normal operation: Configure A/B/C using A records. @@ -105,7 +105,7 @@ if (emergency) { A("a", "10.10.10.10"), A("b", "10.10.10.11"), A("c", "10.10.10.12"), - END); + ); } ``` diff --git a/documentation/code-tricks.md b/documentation/code-tricks.md index 8bb18fb671..30ed409c1b 100644 --- a/documentation/code-tricks.md +++ b/documentation/code-tricks.md @@ -11,67 +11,18 @@ Solution: Use a "builder" to construct it for you. # Trailing commas -**Trailing commas** (sometimes called "final commas") can be useful when adding new Domain Modifiers to your DNSControl code. If you want to add a Domain Modifier, you can add a new line without modifying the previously last line if that line already uses a trailing comma. This makes version-control diffs cleaner and editing code might be less troublesome. - -Because the DNSControl JavaScript DSL has no trailing commas, you can use the `END` constant within `D()`. - -## Version-control diffs example - -{% hint style="info" %} -**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](language-reference/domain-modifiers/A.md) 'foo' configured. - -{% code title="dnsconfig.js" %} -```javascript -D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), - A("foo", "1.2.3.4") -); -``` -{% endcode %} - -Let's say we want to add an [A record](language-reference/domain-modifiers/A.md) 'bar' to this domain. +You might encounter `D()` statements in code examples that include `END` at the end, such as: {% code title="dnsconfig.js" %} ```javascript D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), - A("foo", "1.2.3.4"), - A("bar", "4.3.2.1") -); -``` -{% endcode %} - -This will generate the version-control diff below: - -{% code title="dnsconfig.js" %} -```diff -- A("foo", "1.2.3.4"), -+ A("foo", "1.2.3.4"), -+ A("bar", "4.3.2.1") -); -``` -{% endcode %} - -Let's apply the same A-record 'foo' to the domain using the `END` constant. - -{% code title="dnsconfig.js" %} -```javascript -D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), - A("foo", "1.2.3.4"), + A("test", "1.2.3.4"), END); ``` {% endcode %} -This will generate the cleaner version-control diff below: - -{% code title="dnsconfig.js" %} -```diff - A("foo", "1.2.3.4"), -+ A("bar", "4.3.2.1"), -END); -``` -{% endcode %} +As of [DNSControl v4.15.0](https://github.com/StackExchange/dnscontrol/releases/tag/v4.15.0), the `END` statements are no longer necessary. +These were originally included for historical reasons that are now irrelevant. You can safely remove them from your configurations. # Repeat records in many domains (macros) @@ -133,7 +84,7 @@ function PARKED_R53(name) { A("@", "10.2.3.4"), CNAME("www", "@"), SPF_NONE, //deters spammers from using the domain in From: lines. - END); + ); } PARKED_R53("example1.tld"); @@ -156,7 +107,7 @@ _.each( D(d, REG_NAMECOM, DnsProvider(DSP_MY_PROVIDER), A("@", "10.2.3.4"), CNAME("www", "@"), - END); + ); } ); ``` diff --git a/documentation/examples.md b/documentation/examples.md index 8e5847fa2a..b8f440108c 100644 --- a/documentation/examples.md +++ b/documentation/examples.md @@ -13,7 +13,7 @@ D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), TXT("the", "message"), NS("department2", "ns1.dnsexample.com."), // use different nameservers NS("department2", "ns2.dnsexample.com."), // for department2.example.com -END); +); ``` {% endcode %} @@ -32,7 +32,7 @@ D("example.com", REG_MY_PROVIDER, A("@", "1.2.3.4", TTL("10m")), // individual record CNAME("mail", "mx01"), // TTL of 5m, as defined per DefaultTTL() -END); +); ``` {% endcode %} @@ -46,7 +46,7 @@ var DSP_R53 = NewDnsProvider("route53_user1"); D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_R53), A("@", addrA), // 1.2.3.4 A("www", addrA + 1), // 1.2.3.5 -END); +); ``` {% endcode %} @@ -72,7 +72,7 @@ var activeDC = dcA; D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_R53), A("@", activeDC + 5), // fixed address based on activeDC -END); +); ``` {% endcode %} @@ -100,7 +100,7 @@ D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_R53), GOOGLE_APPS_MX_RECORDS, GOOGLE_APPS_CNAME_RECORDS, A("@", "1.2.3.4"), -END); +); ``` {% endcode %} @@ -123,7 +123,7 @@ D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), "~all" ] }), -END); +); ``` {% endcode %} @@ -134,7 +134,7 @@ DEFAULTS( NAMESERVER_TTL("24h"), DefaultTTL("12h"), CF_PROXY_DEFAULT_OFF, -END); +); ``` {% endcode %} @@ -149,19 +149,19 @@ var DSP_GCLOUD = NewDnsProvider("gcloud_admin"); D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_R53), DnsProvider(DSP_GCLOUD), A("@", "1.2.3.4"), -END); +); // above zone uses 8 NS records total (4 from each provider dynamically gathered) // below zone will only take 2 from each for a total of 4. May be better for performance reasons. D("example2.com", REG_MY_PROVIDER, DnsProvider(DSP_R53, 2), DnsProvider(DSP_GCLOUD ,2), A("@", "1.2.3.4"), -END); +); // or set a Provider as a non-authoritative backup (don"t register its nameservers) D("example3.com", REG_MY_PROVIDER, DnsProvider(DSP_R53), DnsProvider(DSP_GCLOUD, 0), A("@", "1.2.3.4"), -END); +); ``` {% endcode %} @@ -204,7 +204,7 @@ var DSP_R53_MAIN = NewDnsProvider("r53_main"); D("example.com", REG_NONE, DnsProvider(DSP_R53_MAIN), FASTMAIL_MX, FASTMAIL_DKIM("example.com"), -END); +); ``` {% endcode %} diff --git a/documentation/getting-started.md b/documentation/getting-started.md index 1d04a160bb..675a3f52b9 100644 --- a/documentation/getting-started.md +++ b/documentation/getting-started.md @@ -98,7 +98,7 @@ var DNS_BIND = NewDnsProvider("bind"); D("example.com", REG_NONE, DnsProvider(DNS_BIND), A("@", "1.2.3.4"), -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/domain-modifiers/A.md b/documentation/language-reference/domain-modifiers/A.md index 14a4dda92d..fdc8b266f2 100644 --- a/documentation/language-reference/domain-modifiers/A.md +++ b/documentation/language-reference/domain-modifiers/A.md @@ -23,6 +23,6 @@ D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), A("foo", "2.3.4.5"), A("test.foo", IP("1.2.3.4"), TTL(5000)), A("*", "1.2.3.4", {foo: 42}), -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/domain-modifiers/AAAA.md b/documentation/language-reference/domain-modifiers/AAAA.md index 6f83c1716d..361290956f 100644 --- a/documentation/language-reference/domain-modifiers/AAAA.md +++ b/documentation/language-reference/domain-modifiers/AAAA.md @@ -25,6 +25,6 @@ D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), AAAA("foo", addrV6), AAAA("test.foo", addrV6, TTL(5000)), AAAA("*", addrV6, {foo: 42}), -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/domain-modifiers/ALIAS.md b/documentation/language-reference/domain-modifiers/ALIAS.md index 502db74217..f7ef804ebf 100644 --- a/documentation/language-reference/domain-modifiers/ALIAS.md +++ b/documentation/language-reference/domain-modifiers/ALIAS.md @@ -22,6 +22,6 @@ Target should be a string representing the target. If it is a single label we wi ```javascript D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), ALIAS("@", "google.com."), // example.com -> google.com -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/domain-modifiers/AUTODNSSEC_ON.md b/documentation/language-reference/domain-modifiers/AUTODNSSEC_ON.md index 907954e288..df04516ab9 100644 --- a/documentation/language-reference/domain-modifiers/AUTODNSSEC_ON.md +++ b/documentation/language-reference/domain-modifiers/AUTODNSSEC_ON.md @@ -24,12 +24,12 @@ correct syntax is `AUTODNSSEC_ON` not `AUTODNSSEC_ON()` D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), AUTODNSSEC_ON, // Enable AutoDNSSEC. A("@", "10.1.1.1"), -END); +); D("insecure.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), AUTODNSSEC_OFF, // Disable AutoDNSSEC. A("@", "10.2.2.2"), -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/domain-modifiers/AZURE_ALIAS.md b/documentation/language-reference/domain-modifiers/AZURE_ALIAS.md index 330f648492..3e11030fa4 100644 --- a/documentation/language-reference/domain-modifiers/AZURE_ALIAS.md +++ b/documentation/language-reference/domain-modifiers/AZURE_ALIAS.md @@ -53,6 +53,6 @@ This arrangement is useful if you want some record sets to be aliases and some n D("example.com", REG_MY_PROVIDER, DnsProvider("AZURE_DNS"), AZURE_ALIAS("foo", "A", "/subscriptions/726f8cd6-6459-4db4-8e6d-2cd2716904e2/resourceGroups/test/providers/Microsoft.Network/trafficManagerProfiles/testpp2"), // record for traffic manager AZURE_ALIAS("foo", "CNAME", "/subscriptions/726f8cd6-6459-4db4-8e6d-2cd2716904e2/resourceGroups/test/providers/Microsoft.Network/dnszones/example.com/A/quux."), // record in the same zone -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/domain-modifiers/CAA.md b/documentation/language-reference/domain-modifiers/CAA.md index c4718a536c..22428afb1d 100644 --- a/documentation/language-reference/domain-modifiers/CAA.md +++ b/documentation/language-reference/domain-modifiers/CAA.md @@ -34,7 +34,7 @@ D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), // Report all violation to test@example.com. If CA does not support // this record then refuse to issue any certificate CAA("@", "iodef", "mailto:test@example.com", CAA_CRITICAL), -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/domain-modifiers/CAA_BUILDER.md b/documentation/language-reference/domain-modifiers/CAA_BUILDER.md index cddca306db..a7d4b5b780 100644 --- a/documentation/language-reference/domain-modifiers/CAA_BUILDER.md +++ b/documentation/language-reference/domain-modifiers/CAA_BUILDER.md @@ -43,7 +43,7 @@ D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), ], issuewild: "none", }), -END); +); ``` {% endcode %} @@ -56,7 +56,7 @@ D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), CAA("@", "issue", "letsencrypt.org"), CAA("@", "issue", "comodoca.com"), CAA("@", "issuewild", ";"), -END); +); ``` {% endcode %} @@ -88,7 +88,7 @@ D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), issuewild: "none", issuewild_critical: true, }), -END); +); ``` {% endcode %} @@ -101,7 +101,7 @@ D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), CAA("@", "issue", "letsencrypt.org", CAA_CRITICAL), CAA("@", "issue", "comodoca.com", CAA_CRITICAL), CAA("@", "issuewild", ";", CAA_CRITICAL), -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/domain-modifiers/CF_REDIRECT.md b/documentation/language-reference/domain-modifiers/CF_REDIRECT.md index 95aacf5e35..dedf9c37e5 100644 --- a/documentation/language-reference/domain-modifiers/CF_REDIRECT.md +++ b/documentation/language-reference/domain-modifiers/CF_REDIRECT.md @@ -44,6 +44,6 @@ This example redirects the bare (aka apex, or naked) domain to www: ```javascript D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), CF_REDIRECT("example.com/*", "https://www.example.com/$1"), -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/domain-modifiers/CF_SINGLE_REDIRECT.md b/documentation/language-reference/domain-modifiers/CF_SINGLE_REDIRECT.md index 47e296edd5..718cac8b75 100644 --- a/documentation/language-reference/domain-modifiers/CF_SINGLE_REDIRECT.md +++ b/documentation/language-reference/domain-modifiers/CF_SINGLE_REDIRECT.md @@ -29,7 +29,7 @@ D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), CF_SINGLE_REDIRECT("name", 301, "when", "then"), CF_SINGLE_REDIRECT('redirect www.example.com', 301, 'http.host eq "www.example.com"', 'concat("https://otherplace.com", http.request.uri.path)'), CF_SINGLE_REDIRECT('redirect yyy.example.com', 301, 'http.host eq "yyy.example.com"', 'concat("https://survey.stackoverflow.co", "")'), -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/domain-modifiers/CF_TEMP_REDIRECT.md b/documentation/language-reference/domain-modifiers/CF_TEMP_REDIRECT.md index 6b97fc454f..fca2a8a146 100644 --- a/documentation/language-reference/domain-modifiers/CF_TEMP_REDIRECT.md +++ b/documentation/language-reference/domain-modifiers/CF_TEMP_REDIRECT.md @@ -37,6 +37,6 @@ managed by DNSControl and those that aren't. ```javascript D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), CF_TEMP_REDIRECT("example.example.com/*", "https://otherplace.yourdomain.com/$1"), -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/domain-modifiers/CF_WORKER_ROUTE.md b/documentation/language-reference/domain-modifiers/CF_WORKER_ROUTE.md index a448dc0a97..7515742745 100644 --- a/documentation/language-reference/domain-modifiers/CF_WORKER_ROUTE.md +++ b/documentation/language-reference/domain-modifiers/CF_WORKER_ROUTE.md @@ -30,6 +30,6 @@ This example assigns the patterns `api.example.com/*` and `example.com/api/*` to D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), CF_WORKER_ROUTE("api.example.com/*", "my-worker"), CF_WORKER_ROUTE("example.com/api/*", "my-worker"), -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/domain-modifiers/CNAME.md b/documentation/language-reference/domain-modifiers/CNAME.md index 946f34a833..739ca5ab05 100644 --- a/documentation/language-reference/domain-modifiers/CNAME.md +++ b/documentation/language-reference/domain-modifiers/CNAME.md @@ -21,6 +21,6 @@ D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), CNAME("foo", "google.com."), // foo.example.com -> google.com CNAME("abc", "@"), // abc.example.com -> example.com CNAME("def", "test"), // def.example.com -> test.example.com -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/domain-modifiers/DHCID.md b/documentation/language-reference/domain-modifiers/DHCID.md index 45139ec725..0c6eefbb95 100644 --- a/documentation/language-reference/domain-modifiers/DHCID.md +++ b/documentation/language-reference/domain-modifiers/DHCID.md @@ -18,6 +18,6 @@ Digest should be a string. ```javascript D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), DHCID("example.com", "ABCDEFG"), -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/domain-modifiers/DMARC_BUILDER.md b/documentation/language-reference/domain-modifiers/DMARC_BUILDER.md index e4c6faf0df..50f085c5e8 100644 --- a/documentation/language-reference/domain-modifiers/DMARC_BUILDER.md +++ b/documentation/language-reference/domain-modifiers/DMARC_BUILDER.md @@ -48,7 +48,7 @@ D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), "mailto:mailauth-reports@example.com", ], }), -END); +); ``` {% endcode %} @@ -79,7 +79,7 @@ D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), failureOptions: "1", reportInterval: "1h", }), -END); +); ``` {% endcode %} @@ -97,7 +97,7 @@ D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), DKIM: true, }, }), -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/domain-modifiers/DNAME.md b/documentation/language-reference/domain-modifiers/DNAME.md index 989cb8e781..85cc14dde2 100644 --- a/documentation/language-reference/domain-modifiers/DNAME.md +++ b/documentation/language-reference/domain-modifiers/DNAME.md @@ -18,6 +18,6 @@ Target should be a string. ```javascript D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), DNAME("sub", "example.net."), -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/domain-modifiers/DNSKEY.md b/documentation/language-reference/domain-modifiers/DNSKEY.md index e61dc92cfc..7c2f305366 100644 --- a/documentation/language-reference/domain-modifiers/DNSKEY.md +++ b/documentation/language-reference/domain-modifiers/DNSKEY.md @@ -30,6 +30,6 @@ Public key must be a string. ```javascript D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), DNSKEY("@", 257, 3, 13, "AABBCCDD"), -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/domain-modifiers/DS.md b/documentation/language-reference/domain-modifiers/DS.md index 0eb9941f30..529888c959 100644 --- a/documentation/language-reference/domain-modifiers/DS.md +++ b/documentation/language-reference/domain-modifiers/DS.md @@ -30,6 +30,6 @@ Digest must be a string. ```javascript D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), DS("example.com", 2371, 13, 2, "ABCDEF"), -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/domain-modifiers/DefaultTTL.md b/documentation/language-reference/domain-modifiers/DefaultTTL.md index 6a9d740794..e5db9f2ae9 100644 --- a/documentation/language-reference/domain-modifiers/DefaultTTL.md +++ b/documentation/language-reference/domain-modifiers/DefaultTTL.md @@ -18,7 +18,7 @@ D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), DefaultTTL("4h"), A("@","1.2.3.4"), // uses default A("foo", "2.3.4.5", TTL(600)), // overrides default -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/domain-modifiers/HTTPS.md b/documentation/language-reference/domain-modifiers/HTTPS.md index 486d881b95..12d98ec95d 100644 --- a/documentation/language-reference/domain-modifiers/HTTPS.md +++ b/documentation/language-reference/domain-modifiers/HTTPS.md @@ -27,6 +27,6 @@ Modifiers can be any number of [record modifiers](https://docs.dnscontrol.org/la D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), HTTPS("@", 1, ".", "ipv4hint=123.123.123.123 alpn=h3,h2 port=443"), HTTPS("@", 1, "test.com", ""), -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/domain-modifiers/IGNORE.md b/documentation/language-reference/domain-modifiers/IGNORE.md index 6a5d310ee5..8be59e5148 100644 --- a/documentation/language-reference/domain-modifiers/IGNORE.md +++ b/documentation/language-reference/domain-modifiers/IGNORE.md @@ -42,7 +42,7 @@ D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), IGNORE(labelSpec, typeSpec, targetSpec), IGNORE(labelSpec, typeSpec), IGNORE(labelSpec), -END); +); ``` {% endcode %} @@ -80,7 +80,7 @@ D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), IGNORE("bar", "A,MX"), // ignore only A and MX records for name bar IGNORE("*", "*", "dev-*"), // Ignore targets with a `dev-` prefix IGNORE("*", "A", "1\.2\.3\."), // Ignore targets in the 1.2.3.0/24 CIDR block -END); +); ``` {% endcode %} @@ -91,7 +91,7 @@ Ignore Let's Encrypt (ACME) validation records: D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), IGNORE("_acme-challenge", "TXT"), IGNORE("_acme-challenge.**", "TXT"), -END); +); ``` {% endcode %} @@ -116,7 +116,7 @@ D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), IGNORE("domaindnszones.**", "A"), IGNORE("forestdnszones", "A"), IGNORE("forestdnszones.**", "A"), -END); +); ``` {% endcode %} @@ -139,7 +139,7 @@ D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), CNAME("cfull", "www.plts.org."), CNAME("cfull2", "www.bar.plts.org."), CNAME("cfull3", "bar.www.plts.org."), -END); +); D_EXTEND("more.example.com", A("foo", "1.1.1.1"), @@ -148,7 +148,7 @@ D_EXTEND("more.example.com", CNAME("mfull", "www.plts.org."), CNAME("mfull2", "www.bar.plts.org."), CNAME("mfull3", "bar.www.plts.org."), -END); +); ``` {% endcode %} @@ -156,7 +156,7 @@ END); ```javascript D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), IGNORE("@", "", ""), -END); +); ``` {% endcode %} @@ -169,7 +169,7 @@ END); ```javascript D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), IGNORE("example.com.", "", ""), -END); +); ``` {% endcode %} @@ -181,7 +181,7 @@ END); ```javascript D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), IGNORE("foo", "", ""), -END); +); ``` {% endcode %} @@ -193,7 +193,7 @@ END); ```javascript D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), IGNORE("foo.**", "", ""), -END); +); ``` {% endcode %} @@ -205,7 +205,7 @@ END); ```javascript D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), IGNORE("www", "", ""), -END); +); // www.example.com. A 174.136.107.196 ``` {% endcode %} @@ -214,7 +214,7 @@ END); ```javascript D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), IGNORE("www.*", "", ""), -END); +); // nothing ``` {% endcode %} @@ -227,7 +227,7 @@ END); ```javascript D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), IGNORE("www.example.com", "", ""), -END); +); // nothing ``` {% endcode %} @@ -240,7 +240,7 @@ END); ```javascript D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), IGNORE("www.example.com.", "", ""), -END); +); ``` {% endcode %} @@ -252,7 +252,7 @@ END); ```javascript D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), //IGNORE("", "", "1.1.1.*"), -END); +); ``` {% endcode %} @@ -265,7 +265,7 @@ END); ```javascript D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), //IGNORE("", "", "www"), -END); +); ``` {% endcode %} @@ -277,7 +277,7 @@ END); ```javascript D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), IGNORE("", "", "*bar*"), -END); +); ``` {% endcode %} @@ -292,7 +292,7 @@ END); ```javascript D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), IGNORE("", "", "bar.**"), -END); +); ``` {% endcode %} @@ -346,7 +346,7 @@ instead. D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), // THIS NO LONGER WORKS! Use DISABLE_IGNORE_SAFETY_CHECK instead. See above. TXT("myhost", "mytext", IGNORE_NAME_DISABLE_SAFETY_CHECK), -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/domain-modifiers/IMPORT_TRANSFORM.md b/documentation/language-reference/domain-modifiers/IMPORT_TRANSFORM.md index b5a3e0627f..0c137ccd82 100644 --- a/documentation/language-reference/domain-modifiers/IMPORT_TRANSFORM.md +++ b/documentation/language-reference/domain-modifiers/IMPORT_TRANSFORM.md @@ -69,17 +69,17 @@ D("foo.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), A("two","1.2.3.2"), A("three","1.2.3.13"), A("four","1.2.3.14"), -END); +); D("bar.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), A("www","123.123.123.123"), IMPORT_TRANSFORM(TRANSFORM_CF, "foo.com", 300), -END); +); D("baz.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), A("www","123.123.123.123"), IMPORT_TRANSFORM(TRANSFORM_FSTLY, "foo.com", 300), -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/domain-modifiers/INCLUDE.md b/documentation/language-reference/domain-modifiers/INCLUDE.md index 26bcfce8fa..1449adf3e1 100644 --- a/documentation/language-reference/domain-modifiers/INCLUDE.md +++ b/documentation/language-reference/domain-modifiers/INCLUDE.md @@ -13,11 +13,11 @@ Includes all records from a given domain ```javascript D("example.com!external", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), A("test", "8.8.8.8"), -END); +); D("example.com!internal", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), INCLUDE("example.com!external"), A("home", "127.0.0.1"), -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/domain-modifiers/LOC.md b/documentation/language-reference/domain-modifiers/LOC.md index ae4f127d26..ecdf4ade9d 100644 --- a/documentation/language-reference/domain-modifiers/LOC.md +++ b/documentation/language-reference/domain-modifiers/LOC.md @@ -119,6 +119,6 @@ D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), LOC("c", 32, 7, 19, "S",116, 2, 25, "E", 10, 0, 0, 0), //42 21 28.764 N 71 00 51.617 W -44m 2000m LOC("d", 42, 21, 28.764, "N", 71, 0, 51.617, "W", -44, 2000, 0, 0), -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/domain-modifiers/LOC_BUILDER_DD.md b/documentation/language-reference/domain-modifiers/LOC_BUILDER_DD.md index 18be0315b2..513c09c6ff 100644 --- a/documentation/language-reference/domain-modifiers/LOC_BUILDER_DD.md +++ b/documentation/language-reference/domain-modifiers/LOC_BUILDER_DD.md @@ -61,7 +61,7 @@ D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), alt: 19, ttl: "5m", }), -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/domain-modifiers/LOC_BUILDER_DMM_STR.md b/documentation/language-reference/domain-modifiers/LOC_BUILDER_DMM_STR.md index 07a80577af..3be208bc53 100644 --- a/documentation/language-reference/domain-modifiers/LOC_BUILDER_DMM_STR.md +++ b/documentation/language-reference/domain-modifiers/LOC_BUILDER_DMM_STR.md @@ -41,7 +41,7 @@ D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), str: "42°S 147°E", alt: 3, }), -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/domain-modifiers/LOC_BUILDER_DMS_STR.md b/documentation/language-reference/domain-modifiers/LOC_BUILDER_DMS_STR.md index af9b16f352..208242c64d 100644 --- a/documentation/language-reference/domain-modifiers/LOC_BUILDER_DMS_STR.md +++ b/documentation/language-reference/domain-modifiers/LOC_BUILDER_DMS_STR.md @@ -42,7 +42,7 @@ D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), alt: 4, ttl: "5m", }), -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/domain-modifiers/LOC_BUILDER_STR.md b/documentation/language-reference/domain-modifiers/LOC_BUILDER_STR.md index 5db404ed5b..c7058c74e7 100644 --- a/documentation/language-reference/domain-modifiers/LOC_BUILDER_STR.md +++ b/documentation/language-reference/domain-modifiers/LOC_BUILDER_STR.md @@ -48,7 +48,7 @@ D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), str: "53°20′40″N 6°17′20″W", alt: 300, }), -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/domain-modifiers/M365_BUILDER.md b/documentation/language-reference/domain-modifiers/M365_BUILDER.md index 13ef4d1b37..bddf611843 100644 --- a/documentation/language-reference/domain-modifiers/M365_BUILDER.md +++ b/documentation/language-reference/domain-modifiers/M365_BUILDER.md @@ -36,7 +36,7 @@ D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), M365_BUILDER("example.com", { initialDomain: "example.onmicrosoft.com", }), -END); +); ``` {% endcode %} @@ -56,7 +56,7 @@ D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), domainGUID: "test-example-com", // Can be automatically derived in this case, if example.com is the context. initialDomain: "example.onmicrosoft.com", }), -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/domain-modifiers/MX.md b/documentation/language-reference/domain-modifiers/MX.md index 2ec837a51d..67adcada40 100644 --- a/documentation/language-reference/domain-modifiers/MX.md +++ b/documentation/language-reference/domain-modifiers/MX.md @@ -23,6 +23,6 @@ Target should be a string representing the MX target. If it is a single label we D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), MX("@", 5, "mail"), // mx example.com -> mail.example.com MX("sub", 10, "mail.foo.com."), -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/domain-modifiers/NAMESERVER.md b/documentation/language-reference/domain-modifiers/NAMESERVER.md index 354273e94e..5538766db0 100644 --- a/documentation/language-reference/domain-modifiers/NAMESERVER.md +++ b/documentation/language-reference/domain-modifiers/NAMESERVER.md @@ -28,13 +28,13 @@ D("example.com", REG_MY_PROVIDER, // Replace the nameservers: NAMESERVER("ns1.myserver.com."), NAMESERVER("ns2.myserver.com."), -END); +); D("example2.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), // Add these two additional nameservers to the existing list of nameservers. NAMESERVER("ns1.myserver.com."), NAMESERVER("ns2.myserver.com."), -END); +); ``` {% endcode %} @@ -86,6 +86,6 @@ It looks like this: var REG_THIRDPARTY = NewRegistrar("ThirdParty"); D("example.com", REG_THIRDPARTY, ... -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/domain-modifiers/NAMESERVER_TTL.md b/documentation/language-reference/domain-modifiers/NAMESERVER_TTL.md index f952ac9f8b..54a3094472 100644 --- a/documentation/language-reference/domain-modifiers/NAMESERVER_TTL.md +++ b/documentation/language-reference/domain-modifiers/NAMESERVER_TTL.md @@ -17,7 +17,7 @@ The value can be an integer or a string. See [`TTL`](../record-modifiers/TTL.md) D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), NAMESERVER_TTL("2d"), NAMESERVER("ns"), -END); +); ``` {% endcode %} @@ -32,7 +32,7 @@ D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), NAMESERVER("ns2.provider.com."), //inherits NAMESERVER_TTL A("@","1.2.3.4"), // inherits DefaultTTL A("foo", "2.3.4.5", TTL(600)), // overrides DefaultTTL for this record only -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/domain-modifiers/NAPTR.md b/documentation/language-reference/domain-modifiers/NAPTR.md index 5a6a147b71..739c86e1a9 100644 --- a/documentation/language-reference/domain-modifiers/NAPTR.md +++ b/documentation/language-reference/domain-modifiers/NAPTR.md @@ -167,7 +167,7 @@ D("3.2.1.5.5.5.0.0.8.1.e164.arpa.", REG_MY_PROVIDER, DnsProvider(R53), NAPTR("8", 10, 10, "u", "E2U+SIP", "!^.*$!sip:mike@example.com!", "."), NAPTR("9", 10, 10, "u", "E2U+SIP", "!^.*$!sip:linda@example.com!", "."), NAPTR("0", 10, 10, "u", "E2U+SIP", "!^.*$!sip:fax@example.com!", "."), -END); +); ``` {% endcode %} @@ -178,7 +178,7 @@ D("4.3.2.1.5.5.5.0.0.8.1.e164.arpa.", REG_MY_PROVIDER, DnsProvider(R53), NAPTR("@", 100, 50, "u", "E2U+SIP", "!^.*$!sip:customer-service@example.com!", "."), NAPTR("@", 101, 50, "u", "E2U+email", "!^.*$!mailto:information@example.com!", "."), NAPTR("@", 101, 50, "u", "smtp+E2U", "!^.*$!mailto:information@example.com!", "."), -END); +); ``` {% endcode %} @@ -199,7 +199,7 @@ D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), A("sip", "192.0.2.2"), AAAA("sip", "2001:db8::85a3"), // and so on -END); +); ``` {% endcode %} @@ -217,7 +217,7 @@ D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), SRV("_z3950._tcp", 0, 0, 1000, "z3950.beast.example.com."), SRV("_http._tcp", 10, 0, 80, "foo.example.com."), // and so on -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/domain-modifiers/NO_PURGE.md b/documentation/language-reference/domain-modifiers/NO_PURGE.md index 229cda3b90..664a29da3b 100644 --- a/documentation/language-reference/domain-modifiers/NO_PURGE.md +++ b/documentation/language-reference/domain-modifiers/NO_PURGE.md @@ -29,7 +29,7 @@ in place. ```javascript D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), NO_PURGE, A("foo","1.2.3.4"), -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/domain-modifiers/NS.md b/documentation/language-reference/domain-modifiers/NS.md index d26d5936df..2d9bb3f3a0 100644 --- a/documentation/language-reference/domain-modifiers/NS.md +++ b/documentation/language-reference/domain-modifiers/NS.md @@ -25,6 +25,6 @@ D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), NS("foo", "ns2.example2.com."), // Delegate ".foo.example.com" zone to another server. A("ns1.example2.com", "10.10.10.10"), // Glue records A("ns2.example2.com", "10.10.10.20"), // Glue records -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/domain-modifiers/PTR.md b/documentation/language-reference/domain-modifiers/PTR.md index 2853880280..ec51a43a5c 100644 --- a/documentation/language-reference/domain-modifiers/PTR.md +++ b/documentation/language-reference/domain-modifiers/PTR.md @@ -68,7 +68,7 @@ D(REV("1.2.3.0/24"), REGISTRAR, DnsProvider(BIND), PTR("3", "baz.example.com."), // If the first parameter is a valid IP address, DNSControl will generate the correct name: PTR("1.2.3.10", "ten.example.com."), // "10" -END); +); ``` {% endcode %} @@ -76,7 +76,7 @@ END); ```javascript D(REV("9.9.9.128/25"), REGISTRAR, DnsProvider(BIND), PTR("9.9.9.129", "first.example.com."), -END); +); ``` {% endcode %} @@ -87,14 +87,14 @@ D(REV("2001:db8:302::/48"), REGISTRAR, DnsProvider(BIND), // If the first parameter is a valid IP address, DNSControl will generate the correct name: PTR("2001:db8:302::2", "two.example.com."), // "2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0" PTR("2001:db8:302::3", "three.example.com."), // "3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0" -END); +); ``` {% endcode %} # Automatic forward and reverse lookups DNSControl does not automatically generate forward and reverse lookups. However -it is possible to write a macro that does this by using the +it is possible to write a macro that does this by using the [`D_EXTEND()`](../global/D_EXTEND.md) function to insert `A` and `PTR` records into previously-defined domains. @@ -111,10 +111,10 @@ function FORWARD_AND_REVERSE(ipaddr, fqdn) { D("example.com", REGISTRAR, DnsProvider(DSP_NONE), ..., -END); +); D(REV("10.20.30.0/24"), REGISTRAR, DnsProvider(DSP_NONE), ..., -END); +); FORWARD_AND_REVERSE("10.20.30.77", "foo.example.com."); FORWARD_AND_REVERSE("10.20.30.99", "bar.example.com."); diff --git a/documentation/language-reference/domain-modifiers/PURGE.md b/documentation/language-reference/domain-modifiers/PURGE.md index 7cc27651e2..7b7593d005 100644 --- a/documentation/language-reference/domain-modifiers/PURGE.md +++ b/documentation/language-reference/domain-modifiers/PURGE.md @@ -25,7 +25,7 @@ Purge is the default, but we set it anyway: ```javascript D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), PURGE, -END); +); ``` {% endcode %} @@ -39,6 +39,6 @@ D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), PURGE, NO_PURGE, PURGE, -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/domain-modifiers/R53_ALIAS.md b/documentation/language-reference/domain-modifiers/R53_ALIAS.md index 807a23f9cf..c7f4b0d0c0 100644 --- a/documentation/language-reference/domain-modifiers/R53_ALIAS.md +++ b/documentation/language-reference/domain-modifiers/R53_ALIAS.md @@ -49,6 +49,6 @@ D("example.com", REG_MY_PROVIDER, DnsProvider("ROUTE53"), R53_ALIAS("foo", "A", "blahblah.elasticloadbalancing.us-west-1.amazonaws.com.", R53_ZONE("Z368ELLRRE2KJ0"), R53_EVALUATE_TARGET_HEALTH(true)), // a classic ELB in us-west-1 with target health evaluation enabled R53_ALIAS("foo", "A", "blahblah.elasticbeanstalk.us-west-2.amazonaws.com.", R53_ZONE("Z38NKT9BP95V3O")), // an Elastic Beanstalk environment in us-west-2 R53_ALIAS("foo", "A", "blahblah-bucket.s3-website-us-west-1.amazonaws.com.", R53_ZONE("Z2F56UZL2M1ACD")), // a website S3 Bucket in us-west-1 -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/domain-modifiers/SOA.md b/documentation/language-reference/domain-modifiers/SOA.md index 078c41b378..649bbdf324 100644 --- a/documentation/language-reference/domain-modifiers/SOA.md +++ b/documentation/language-reference/domain-modifiers/SOA.md @@ -26,7 +26,7 @@ parameter_types: ```javascript D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), SOA("@", "ns3.example.com.", "hostmaster@example.com", 3600, 600, 604800, 1440), -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/domain-modifiers/SPF_BUILDER.md b/documentation/language-reference/domain-modifiers/SPF_BUILDER.md index 71660b217b..daea3a41dd 100644 --- a/documentation/language-reference/domain-modifiers/SPF_BUILDER.md +++ b/documentation/language-reference/domain-modifiers/SPF_BUILDER.md @@ -41,7 +41,7 @@ Here is an example of how SPF settings are normally done: ```javascript D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), TXT("v=spf1 ip4:198.252.206.0/24 ip4:192.111.0.0/24 include:_spf.google.com include:mailgun.org include:spf-basic.fogcreek.com include:mail.zendesk.com include:servers.mcsv.net include:sendgrid.net include:450622.spf05.hubspotemail.net ~all"), -END) +); ``` {% endcode %} @@ -81,7 +81,7 @@ D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), "450622.spf05.hubspotemail.net" // Rationale: Unlikely to change without warning. ] }), -END); +); ``` {% endcode %} @@ -118,7 +118,7 @@ D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), }), ... ... -END); +); ``` {% endcode %} @@ -307,10 +307,10 @@ var SPF_MYSETTINGS = SPF_BUILDER({ D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), SPF_MYSETTINGS, -END); +); D("example2.tld", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), SPF_MYSETTINGS, -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/domain-modifiers/SRV.md b/documentation/language-reference/domain-modifiers/SRV.md index e52e1101d0..b0c4c71b0b 100644 --- a/documentation/language-reference/domain-modifiers/SRV.md +++ b/documentation/language-reference/domain-modifiers/SRV.md @@ -27,6 +27,6 @@ D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), // pr w port, target SRV("_sip._tcp", 10, 60, 5060, "bigbox.example.com."), SRV("_sip._tcp", 10, 20, 5060, "smallbox1.example.com."), -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/domain-modifiers/SSHFP.md b/documentation/language-reference/domain-modifiers/SSHFP.md index 6598b82149..6d10226290 100644 --- a/documentation/language-reference/domain-modifiers/SSHFP.md +++ b/documentation/language-reference/domain-modifiers/SSHFP.md @@ -40,6 +40,6 @@ parameter_types: ```javascript D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), SSHFP("@", 1, 1, "00yourAmazingFingerprint00"), -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/domain-modifiers/SVCB.md b/documentation/language-reference/domain-modifiers/SVCB.md index 8972603683..1aef189ba9 100644 --- a/documentation/language-reference/domain-modifiers/SVCB.md +++ b/documentation/language-reference/domain-modifiers/SVCB.md @@ -26,6 +26,6 @@ Modifiers can be any number of [record modifiers](https://docs.dnscontrol.org/la ```javascript D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), SVCB("@", 1, ".", "ipv4hint=123.123.123.123 alpn=h3,h2 port=443"), -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/domain-modifiers/TLSA.md b/documentation/language-reference/domain-modifiers/TLSA.md index 6a626acfad..8299cbd9fa 100644 --- a/documentation/language-reference/domain-modifiers/TLSA.md +++ b/documentation/language-reference/domain-modifiers/TLSA.md @@ -27,6 +27,6 @@ Certificate is a hex string. D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), // Create TLSA record for certificate used on TCP port 443 TLSA("_443._tcp", 3, 1, 1, "abcdef0"), -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/domain-modifiers/TXT.md b/documentation/language-reference/domain-modifiers/TXT.md index 04f3eb9ef2..0b2edb70bd 100644 --- a/documentation/language-reference/domain-modifiers/TXT.md +++ b/documentation/language-reference/domain-modifiers/TXT.md @@ -31,7 +31,7 @@ Modifiers can be any number of [record modifiers](https://docs.dnscontrol.org/la TXT("quoted", "any "quotes" and escapes? ugh; no worries!"), TXT("_domainkey", "t=y; o=-;"), // Escapes are done for you automatically. TXT("long", "X".repeat(300)), // Long strings are split automatically. - END); + ); ``` {% endcode %} diff --git a/documentation/language-reference/record-modifiers/TTL.md b/documentation/language-reference/record-modifiers/TTL.md index e967638092..a76806e0be 100644 --- a/documentation/language-reference/record-modifiers/TTL.md +++ b/documentation/language-reference/record-modifiers/TTL.md @@ -32,6 +32,6 @@ D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), A("foo", "2.3.4.5", TTL(500)), // overrides default A("demo1", "3.4.5.11", TTL("5d")), // 5 days A("demo2", "3.4.5.12", TTL("5w")), // 5 weeks -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/top-level-functions/D.md b/documentation/language-reference/top-level-functions/D.md index 393170ac33..de6c0ccf80 100644 --- a/documentation/language-reference/top-level-functions/D.md +++ b/documentation/language-reference/top-level-functions/D.md @@ -27,7 +27,7 @@ Modifier arguments are processed according to type as follows: D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), A("@","1.2.3.4"), CNAME("test", "foo.example2.com."), -END); +); // "macro" for records that can be mixed into any zone var GOOGLE_APPS_DOMAIN_MX = [ @@ -42,7 +42,7 @@ D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), A("@","1.2.3.4"), CNAME("test", "foo.example2.com."), GOOGLE_APPS_DOMAIN_MX, -END); +); ``` {% endcode %} @@ -64,15 +64,15 @@ var DNS_OUTSIDE = NewDnsProvider("bind"); D("example.com!inside", REG_THIRDPARTY, DnsProvider(DNS_INSIDE), A("www", "10.10.10.10"), -END); +); D("example.com!outside", REG_THIRDPARTY, DnsProvider(DNS_OUTSIDE), A("www", "20.20.20.20"), -END); +); D_EXTEND("example.com!inside", A("internal", "10.99.99.99"), -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/top-level-functions/DEFAULTS.md b/documentation/language-reference/top-level-functions/DEFAULTS.md index 17b54939e4..fb0eae9028 100644 --- a/documentation/language-reference/top-level-functions/DEFAULTS.md +++ b/documentation/language-reference/top-level-functions/DEFAULTS.md @@ -20,11 +20,11 @@ var COMMON = NewDnsProvider("foo"); DEFAULTS( DnsProvider(COMMON, 0), DefaultTTL("1d"), -END); +); D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), A("@","1.2.3.4"), -END); +); ``` {% endcode %} @@ -37,6 +37,6 @@ DEFAULTS(); D("example2.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), A("@","1.2.3.4"), -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/top-level-functions/DOMAIN_ELSEWHERE.md b/documentation/language-reference/top-level-functions/DOMAIN_ELSEWHERE.md index b41aa374ee..5dca9adaff 100644 --- a/documentation/language-reference/top-level-functions/DOMAIN_ELSEWHERE.md +++ b/documentation/language-reference/top-level-functions/DOMAIN_ELSEWHERE.md @@ -35,7 +35,7 @@ D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), NO_PURGE, NAMESERVER("ns1.foo.com"), NAMESERVER("ns2.foo.com"), -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/top-level-functions/DOMAIN_ELSEWHERE_AUTO.md b/documentation/language-reference/top-level-functions/DOMAIN_ELSEWHERE_AUTO.md index be25be0836..49e4a2ccf4 100644 --- a/documentation/language-reference/top-level-functions/DOMAIN_ELSEWHERE_AUTO.md +++ b/documentation/language-reference/top-level-functions/DOMAIN_ELSEWHERE_AUTO.md @@ -39,7 +39,7 @@ DOMAIN_ELSEWHERE_AUTO("example.com", REG_NAMEDOTCOM, DSP_AZURE); D("example.com", REG_NAMEDOTCOM, NO_PURGE, DnsProvider(DSP_AZURE), -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/top-level-functions/D_EXTEND.md b/documentation/language-reference/top-level-functions/D_EXTEND.md index 55be8d0822..86c2998a27 100644 --- a/documentation/language-reference/top-level-functions/D_EXTEND.md +++ b/documentation/language-reference/top-level-functions/D_EXTEND.md @@ -39,24 +39,24 @@ D("domain.tld", REG_MY_PROVIDER, DnsProvider(DNS), A("@", "127.0.0.1"), // domain.tld A("www", "127.0.0.2"), // www.domain.tld CNAME("a", "b"), // a.domain.tld -> b.domain.tld -END); +); D_EXTEND("domain.tld", A("aaa", "127.0.0.3"), // aaa.domain.tld CNAME("c", "d"), // c.domain.tld -> d.domain.tld -END); +); D_EXTEND("sub.domain.tld", A("bbb", "127.0.0.4"), // bbb.sub.domain.tld A("ccc", "127.0.0.5"), // ccc.sub.domain.tld CNAME("e", "f"), // e.sub.domain.tld -> f.sub.domain.tld -END); +); D_EXTEND("sub.sub.domain.tld", A("ddd", "127.0.0.6"), // ddd.sub.sub.domain.tld CNAME("g", "h"), // g.sub.sub.domain.tld -> h.sub.sub.domain.tld -END); +); D_EXTEND("sub.domain.tld", A("@", "127.0.0.7"), // sub.domain.tld CNAME("i", "j"), // i.sub.domain.tld -> j.sub.domain.tld -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/top-level-functions/FETCH.md b/documentation/language-reference/top-level-functions/FETCH.md index 99b083001c..bebd11ef5f 100644 --- a/documentation/language-reference/top-level-functions/FETCH.md +++ b/documentation/language-reference/top-level-functions/FETCH.md @@ -24,7 +24,7 @@ Otherwise the syntax of `FETCH` is the same as `fetch`. ```javascript D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), A("@", "1.2.3.4"), -END); +); FETCH("https://example.com", { // All three options below are optional diff --git a/documentation/language-reference/top-level-functions/NewDnsProvider.md b/documentation/language-reference/top-level-functions/NewDnsProvider.md index c44855cda4..fe333b767b 100644 --- a/documentation/language-reference/top-level-functions/NewDnsProvider.md +++ b/documentation/language-reference/top-level-functions/NewDnsProvider.md @@ -32,7 +32,7 @@ var DNS_MYAWS = NewDnsProvider("myaws", "ROUTE53"); D("example.com", REG_MYNDC, DnsProvider(DNS_MYAWS), A("@","1.2.3.4"), -END); +); ``` {% endcode %} @@ -45,6 +45,6 @@ var DNS_MYAWS = NewDnsProvider("myaws"); D("example.com", REG_MYNDC, DnsProvider(DNS_MYAWS), A("@","1.2.3.4"), -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/top-level-functions/NewRegistrar.md b/documentation/language-reference/top-level-functions/NewRegistrar.md index 1eb3b69cb6..ce3d6566f4 100644 --- a/documentation/language-reference/top-level-functions/NewRegistrar.md +++ b/documentation/language-reference/top-level-functions/NewRegistrar.md @@ -32,7 +32,7 @@ var DNS_MYAWS = NewDnsProvider("myaws", "ROUTE53"); D("example.com", REG_MYNDC, DnsProvider(DNS_MYAWS), A("@","1.2.3.4"), -END); +); ``` {% endcode %} @@ -45,6 +45,6 @@ var DNS_MYAWS = NewDnsProvider("myaws"); D("example.com", REG_MYNDC, DnsProvider(DNS_MYAWS), A("@","1.2.3.4"), -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/top-level-functions/REV.md b/documentation/language-reference/top-level-functions/REV.md index 582ef57d28..a8a77dd44a 100644 --- a/documentation/language-reference/top-level-functions/REV.md +++ b/documentation/language-reference/top-level-functions/REV.md @@ -63,14 +63,14 @@ D(REV("1.2.3.0/24"), REGISTRAR, DnsProvider(BIND), PTR("3", "baz.example.com."), // If the first parameter is an IP address, DNSControl automatically calls REV() for you. PTR("1.2.3.10", "ten.example.com."), -END); +); D(REV("2001:db8:302::/48"), REGISTRAR, DnsProvider(BIND), PTR("1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0", "foo.example.com."), // 2001:db8:302::1 // If the first parameter is an IP address, DNSControl automatically calls REV() for you. PTR("2001:db8:302::2", "two.example.com."), // 2.0.0... PTR("2001:db8:302::3", "three.example.com."), // 3.0.0... -END); +); ``` {% endcode %} diff --git a/documentation/language-reference/top-level-functions/require.md b/documentation/language-reference/top-level-functions/require.md index 6226e5c465..c6919e68a2 100644 --- a/documentation/language-reference/top-level-functions/require.md +++ b/documentation/language-reference/top-level-functions/require.md @@ -46,7 +46,7 @@ require("kubernetes/clusters.js"); D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), IncludeKubernetes(), -END); +); ``` {% endcode %} diff --git a/documentation/markdown-examples/code/dnsconfig-code-example-with-filename.md b/documentation/markdown-examples/code/dnsconfig-code-example-with-filename.md index 9746454494..3875b1897b 100644 --- a/documentation/markdown-examples/code/dnsconfig-code-example-with-filename.md +++ b/documentation/markdown-examples/code/dnsconfig-code-example-with-filename.md @@ -5,6 +5,6 @@ var DNS_BIND = NewDnsProvider("bind"); D("example.com", REG_NONE, DnsProvider(DNS_BIND), A("@", "1.2.3.4"), -END); +); ``` {% endcode %} diff --git a/documentation/nameservers.md b/documentation/nameservers.md index 7f62d8b3b1..13cc627f0a 100644 --- a/documentation/nameservers.md +++ b/documentation/nameservers.md @@ -46,7 +46,7 @@ Simplicity. D("example.com", REG_NAMECOM, DnsProvider(DNS_NAMECOM), A("@", "10.2.3.4"), -END); +); ``` {% endcode %} @@ -65,7 +65,7 @@ you want to use a high-performance DNS server. D("example.com", REG_NAMECOM, DnsProvider(DNS_AWS), A("@", "10.2.3.4"), -END); +); ``` {% endcode %} @@ -86,7 +86,7 @@ updating the zone's records (most likely at a different provider). D("example.com", REG_THIRDPARTY, DnsProvider(DNS_NAMECOM), A("@", "10.2.3.4"), -END); +); ``` {% endcode %} @@ -108,7 +108,7 @@ D("example.com", REG_NAMECOM, NAMESERVER("dns2.p03.nsone.net."), NAMESERVER("dns3.p03.nsone.net."), NAMESERVER("dns4.p03.nsone.net."), -END); +); ``` {% endcode %} @@ -131,7 +131,7 @@ D("example.com", REG_NAMECOM, NAMESERVER("kim.ns.cloudflare.com."), NAMESERVER("walt.ns.cloudflare.com."), A("@", "10.2.3.4"), -END); +); ``` {% endcode %} @@ -150,7 +150,7 @@ D("example.com", REG_NAMECOM, DnsProvider(DNS_NAMECOM), NAMESERVER("ns1.myexample.com"), A("@", "10.2.3.4"), -END); +); ``` {% endcode %} @@ -174,7 +174,7 @@ D("example.com", REG_NAMECOM, DnsProvider(DNS_CLOUDFLARE, 0), // Quietly send a copy of the zone here. DnsProvider(DNS_BIND, 0), // And here too! A("@", "10.2.3.4"), -END); +); ``` {% endcode %} @@ -204,7 +204,7 @@ D("example.com", REG_NAMECOM, DnsProvider(DNS_AWS, 2), // Take 2 nameservers from AWS DnsProvider(DNS_GOOGLE, 2), // Take 2 nameservers from GCP A("@", "10.2.3.4"), -END); +); ``` {% endcode %} @@ -233,7 +233,7 @@ D("example.com", REG_NAMECOM, DnsProvider(DNS_NAMECOM), DnsProvider(DNS_BIND, 0), // Don't activate any nameservers related to BIND. A("@", "10.2.3.4"), -END); +); ``` {% endcode %} @@ -257,7 +257,7 @@ var REG_MONITOR = NewRegistrar("DNS-over-HTTPS"); D("example.com", REG_MONITOR, NAMESERVER("ns1.example.com."), NAMESERVER("ns2.example.com."), -END); +); ``` {% endcode %} diff --git a/documentation/notifications.md b/documentation/notifications.md index 5f730edd62..3d49959182 100644 --- a/documentation/notifications.md +++ b/documentation/notifications.md @@ -35,7 +35,7 @@ Below is an example where we add [the A record](language-reference/domain-modifi ```diff D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), + A("foo", "1.2.3.4"), -END); +); ``` {% endcode %} diff --git a/documentation/provider/akamaiedgedns.md b/documentation/provider/akamaiedgedns.md index 1877ab91b7..c611e04bf7 100644 --- a/documentation/provider/akamaiedgedns.md +++ b/documentation/provider/akamaiedgedns.md @@ -72,7 +72,7 @@ D("example.com", REG_NONE, DnsProvider(DSP_AKAMAIEDGEDNS), AUTODNSSEC_ON, AKAMAICDN("@", "www.preconfigured.edgesuite.net", TTL(20)), A("foo", "1.2.3.4"), -END); +); ``` {% endcode %} diff --git a/documentation/provider/autodns.md b/documentation/provider/autodns.md index cebc550b87..0b3de21b67 100644 --- a/documentation/provider/autodns.md +++ b/documentation/provider/autodns.md @@ -29,6 +29,6 @@ var DSP_AUTODNS = NewDnsProvider("autodns"); D("example.com", REG_NONE, DnsProvider(DSP_AUTODNS), A("test", "1.2.3.4"), -END); +); ``` {% endcode %} diff --git a/documentation/provider/azure_dns.md b/documentation/provider/azure_dns.md index 32157e342e..cde9e9c89b 100644 --- a/documentation/provider/azure_dns.md +++ b/documentation/provider/azure_dns.md @@ -60,7 +60,7 @@ var DSP_AZURE_MAIN = NewDnsProvider("azuredns_main"); D("example.com", REG_NONE, DnsProvider(DSP_AZURE_MAIN), A("test", "1.2.3.4"), -END); +); ``` {% endcode %} diff --git a/documentation/provider/azure_private_dns.md b/documentation/provider/azure_private_dns.md index 85911429b2..4b0e130d9d 100644 --- a/documentation/provider/azure_private_dns.md +++ b/documentation/provider/azure_private_dns.md @@ -58,12 +58,12 @@ var DSP_AZURE_PRIVATE_MAIN = NewDnsProvider("azure_private_dns_main"); D("example.com", REG_NONE, DnsProvider(DSP_AZURE_PRIVATE_MAIN), A("test", "1.2.3.4"), -END); +); ``` {% endcode %} ## Activation -DNSControl depends on a standard [Client credentials Authentication](https://docs.microsoft.com/en-us/cli/azure/create-an-azure-service-principal-azure-cli?view=azure-cli-latest) with permission to list, create and update private zones. +DNSControl depends on a standard [Client credentials Authentication](https://docs.microsoft.com/en-us/cli/azure/create-an-azure-service-principal-azure-cli?view=azure-cli-latest) with permission to list, create and update private zones. ## New domains diff --git a/documentation/provider/bunny_dns.md b/documentation/provider/bunny_dns.md index 6afe663980..a8c9d5ef2d 100644 --- a/documentation/provider/bunny_dns.md +++ b/documentation/provider/bunny_dns.md @@ -48,7 +48,7 @@ var DSP_BUNNY_DNS = NewDnsProvider("bunny_dns"); D("example.com", REG_NONE, DnsProvider(DSP_BUNNY_DNS), A("test", "1.2.3.4"), -END); +); ``` {% endcode %} diff --git a/documentation/provider/cloudflareapi.md b/documentation/provider/cloudflareapi.md index 009df860e5..48d47a1162 100644 --- a/documentation/provider/cloudflareapi.md +++ b/documentation/provider/cloudflareapi.md @@ -164,7 +164,7 @@ D("example.com", REG_NONE, DnsProvider(DSP_CLOUDFLARE), A("www1","1.2.3.11", CF_PROXY_ON), // turn proxy ON. A("www2","1.2.3.12", CF_PROXY_OFF), // default is OFF, this is a no-op. A("www3","1.2.3.13", {"cloudflare_proxy": "on"}), // Old format. -END); +); ``` {% endcode %} @@ -183,7 +183,7 @@ D("example.com", REG_NONE, DnsProvider(DSP_CLOUDFLARE), A("another", "1.2.3.6", CF_PROXY_ON), ALIAS("@", "www.example.com.", CF_PROXY_ON), CNAME("myalias", "www.example.com.", CF_PROXY_ON), -END); +); // Example domain where the CF proxy default is set to "on": D("example2.tld", REG_NONE, DnsProvider(DSP_CLOUDFLARE), @@ -193,7 +193,7 @@ D("example2.tld", REG_NONE, DnsProvider(DSP_CLOUDFLARE), A("another", "1.2.3.6"), ALIAS("@", "www.example2.tld."), CNAME("myalias", "www.example2.tld."), -END); +); ``` {% endcode %} @@ -351,7 +351,7 @@ D("chiphacker.com", REG_NONE, DnsProvider(DSP_CLOUDFLARE), A("meta", "1.2.3.4", CF_PROXY_ON), // ... -END); +); ``` {% endcode %} @@ -374,7 +374,7 @@ D("foo.com", REG_NONE, DnsProvider(DSP_CLOUDFLARE), // Assign the patterns `api.foo.com/*` and `foo.com/api/*` to `my-worker` script. CF_WORKER_ROUTE("api.foo.com/*", "my-worker"), CF_WORKER_ROUTE("foo.com/api/*", "my-worker"), -END); +); ``` {% endcode %} diff --git a/documentation/provider/cloudns.md b/documentation/provider/cloudns.md index a2f19d38e2..727acea495 100644 --- a/documentation/provider/cloudns.md +++ b/documentation/provider/cloudns.md @@ -43,7 +43,7 @@ var DSP_CLOUDNS = NewDnsProvider("cloudns"); D("example.com", REG_NONE, DnsProvider(DSP_CLOUDNS), CLOUDNS_WR("@", "http://example.com/"), CLOUDNS_WR("www", "http://example.com/"), -END) +); ``` {% endcode %} @@ -57,7 +57,7 @@ var DSP_CLOUDNS = NewDnsProvider("cloudns"); D("example.com", REG_NONE, DnsProvider(DSP_CLOUDNS), A("test", "1.2.3.4"), -END); +); ``` {% endcode %} diff --git a/documentation/provider/cnr.md b/documentation/provider/cnr.md index b7583726dc..a439fd04b1 100644 --- a/documentation/provider/cnr.md +++ b/documentation/provider/cnr.md @@ -88,7 +88,7 @@ D("example.com", REG_CNR, DnsProvider(DSP_CNR), NAMESERVER("ns4.rrpproxy.net"), A("elk1", "10.190.234.178"), A("test", "56.123.54.12"), -END); +); ``` {% endcode %} diff --git a/documentation/provider/cscglobal.md b/documentation/provider/cscglobal.md index b0542615ac..922861f971 100644 --- a/documentation/provider/cscglobal.md +++ b/documentation/provider/cscglobal.md @@ -38,7 +38,7 @@ var DSP_BIND = NewDnsProvider("bind"); D("example.com", REG_CSCGLOBAL, DnsProvider(DSP_BIND), A("test", "1.2.3.4"), -END); +); ``` {% endcode %} diff --git a/documentation/provider/desec.md b/documentation/provider/desec.md index 397912804c..fb70afee90 100644 --- a/documentation/provider/desec.md +++ b/documentation/provider/desec.md @@ -29,7 +29,7 @@ var DSP_DESEC = NewDnsProvider("desec"); D("example.com", REG_NONE, DnsProvider(DSP_DESEC), A("test", "1.2.3.4"), -END); +); ``` {% endcode %} @@ -42,5 +42,5 @@ deSEC enforces a daily limit of 300 RRset creation/deletion/modification per domain. Large changes may have to be done over the course of a few days. The integration test suite can not be run in a single session. See [https://desec.readthedocs.io/en/latest/rate-limits.html#api-request-throttling](https://desec.readthedocs.io/en/latest/rate-limits.html#api-request-throttling) -{% endhint %} +{% endhint %} diff --git a/documentation/provider/digitalocean.md b/documentation/provider/digitalocean.md index e9e3311d08..bb83d34f79 100644 --- a/documentation/provider/digitalocean.md +++ b/documentation/provider/digitalocean.md @@ -29,7 +29,7 @@ var DSP_DIGITALOCEAN = NewDnsProvider("mydigitalocean"); D("example.com", REG_NONE, DnsProvider(DSP_DIGITALOCEAN), A("test", "1.2.3.4"), -END); +); ``` {% endcode %} diff --git a/documentation/provider/dnsimple.md b/documentation/provider/dnsimple.md index a27a3ed353..0560b404fb 100644 --- a/documentation/provider/dnsimple.md +++ b/documentation/provider/dnsimple.md @@ -38,7 +38,7 @@ var DSP_DNSIMPLE = NewDnsProvider("dnsimple"); D("example.com", REG_DNSIMPLE, DnsProvider(DSP_DNSIMPLE), A("test", "1.2.3.4"), -END); +); ``` {% endcode %} diff --git a/documentation/provider/dnsmadeeasy.md b/documentation/provider/dnsmadeeasy.md index 388315564b..027b58e156 100644 --- a/documentation/provider/dnsmadeeasy.md +++ b/documentation/provider/dnsmadeeasy.md @@ -38,7 +38,7 @@ var DSP_DNSMADEEASY = NewDnsProvider("dnsmadeeasy"); D("example.com", REG_NONE, DnsProvider(DSP_DNSMADEEASY), A("test", "1.2.3.4"), -END); +); ``` {% endcode %} diff --git a/documentation/provider/dnsoverhttps.md b/documentation/provider/dnsoverhttps.md index 399eb0260a..002a88c315 100644 --- a/documentation/provider/dnsoverhttps.md +++ b/documentation/provider/dnsoverhttps.md @@ -48,7 +48,7 @@ var REG_MONITOR = NewRegistrar("dohcloudflare"); D("example.com", REG_MONITOR, NAMESERVER("ns1.example.com."), NAMESERVER("ns2.example.com."), -END); +); ``` {% endcode %} diff --git a/documentation/provider/domainnameshop.md b/documentation/provider/domainnameshop.md index 9b6a9cc88a..49a589eff0 100644 --- a/documentation/provider/domainnameshop.md +++ b/documentation/provider/domainnameshop.md @@ -30,7 +30,7 @@ var DSP_DOMAINNAMESHOP = NewDnsProvider("mydomainnameshop"); D("example.com", REG_NONE, DnsProvider(DSP_DOMAINNAMESHOP), A("test", "1.2.3.4"), -END); +); ``` {% endcode %} diff --git a/documentation/provider/easyname.md b/documentation/provider/easyname.md index fd93d999aa..748d771f70 100644 --- a/documentation/provider/easyname.md +++ b/documentation/provider/easyname.md @@ -35,7 +35,7 @@ var REG_EASYNAME = NewRegistrar("easyname"); D("example.com", REG_EASYNAME, NAMESERVER("ns1.example.com."), NAMESERVER("ns2.example.com."), -END); +); ``` {% endcode %} diff --git a/documentation/provider/exoscale.md b/documentation/provider/exoscale.md index e57ba347ed..2f3d2dd5f6 100644 --- a/documentation/provider/exoscale.md +++ b/documentation/provider/exoscale.md @@ -14,6 +14,6 @@ var DSP_EXOSCALE = NewDnsProvider("exoscale"); D("example.com", REG_NONE, DnsProvider(DSP_EXOSCALE), A("test", "1.2.3.4"), -END); +); ``` {% endcode %} diff --git a/documentation/provider/gandi_v5.md b/documentation/provider/gandi_v5.md index 4f1942d000..9253f3a32f 100644 --- a/documentation/provider/gandi_v5.md +++ b/documentation/provider/gandi_v5.md @@ -91,7 +91,7 @@ var DSP_GANDI = NewDnsProvider("gandi"); D("example.com", REG_GANDI, DnsProvider(DSP_GANDI), A("test", "1.2.3.4"), -END); +); ``` {% endcode %} diff --git a/documentation/provider/gcloud.md b/documentation/provider/gcloud.md index 66e6defb61..b53093ebcb 100644 --- a/documentation/provider/gcloud.md +++ b/documentation/provider/gcloud.md @@ -66,7 +66,7 @@ var DSP_GCLOUD = NewDnsProvider("gcloud"); D("example.com", REG_NAMECOM, DnsProvider(DSP_GCLOUD), A("test", "1.2.3.4"), -END); +); ``` {% endcode %} @@ -109,7 +109,7 @@ var DSP_GCLOUD = NewDnsProvider("gcloud", { D("example.tld", REG_NAMECOM, DnsProvider(DSP_GCLOUD), A("test", "1.2.3.4"), -END); +); ``` {% endcode %} diff --git a/documentation/provider/gcore.md b/documentation/provider/gcore.md index 8fec085672..a034b163bd 100644 --- a/documentation/provider/gcore.md +++ b/documentation/provider/gcore.md @@ -91,7 +91,7 @@ var DSP_GCORE = NewDnsProvider("gcore"); D("example.com", REG_NONE, DnsProvider(DSP_GCORE), A("test", "1.2.3.4"), -END); +); ``` {% endcode %} @@ -145,7 +145,7 @@ D("example.com", REG_NONE, DnsProvider(DSP_GCORE), gcore_weight: '34', gcore_ip: '1.2.3.5', }), -END); +); ``` {% endcode %} diff --git a/documentation/provider/hedns.md b/documentation/provider/hedns.md index a5aa66aaf0..3cf294264f 100644 --- a/documentation/provider/hedns.md +++ b/documentation/provider/hedns.md @@ -112,6 +112,6 @@ var DSP_HEDNS = NewDnsProvider("hedns"); D("example.com", REG_NONE, DnsProvider(DSP_HEDNS), A("test", "1.2.3.4"), -END); +); ``` {% endcode %} diff --git a/documentation/provider/hetzner.md b/documentation/provider/hetzner.md index b6c3cf3e91..0616f878fe 100644 --- a/documentation/provider/hetzner.md +++ b/documentation/provider/hetzner.md @@ -32,7 +32,7 @@ var DSP_HETZNER = NewDnsProvider("hetzner"); D("example.com", REG_NONE, DnsProvider(DSP_HETZNER), A("test", "1.2.3.4"), -END); +); ``` {% endcode %} diff --git a/documentation/provider/hexonet.md b/documentation/provider/hexonet.md index 83b5ba5f63..fe04a57a56 100644 --- a/documentation/provider/hexonet.md +++ b/documentation/provider/hexonet.md @@ -92,7 +92,7 @@ D("example.com", REG_HEXONET, DnsProvider(DSP_HEXONET), NAMESERVER("ns4.ispapi.net"), A("elk1", "10.190.234.178"), A("test", "56.123.54.12"), -END); +); ``` {% endcode %} diff --git a/documentation/provider/hostingde.md b/documentation/provider/hostingde.md index 56f1abceca..3d96731bba 100644 --- a/documentation/provider/hostingde.md +++ b/documentation/provider/hostingde.md @@ -27,7 +27,7 @@ var DSP_HOSTINGDE = NewDnsProvider("hosting.de"); D("example.com", REG_HOSTINGDE, DnsProvider(DSP_HOSTINGDE), A("test", "1.2.3.4"), -END); +); ``` {% endcode %} diff --git a/documentation/provider/huaweicloud.md b/documentation/provider/huaweicloud.md index a67346f420..6804e3329f 100644 --- a/documentation/provider/huaweicloud.md +++ b/documentation/provider/huaweicloud.md @@ -48,7 +48,7 @@ D("example.com", REG_NONE, DnsProvider(DSP_HWCLOUD), A("rr-lb", "10.0.1.1", {hw_weight: "10", hw_rrset_key: "lb-zone-b"}), A("rr-lb", "10.0.1.2", {hw_weight: "10", hw_rrset_key: "lb-zone-b"}), A("rr-lb", "10.0.2.2", {hw_weight: "0", hw_rrset_key: "lb-zone-c"}), -END); +); ``` {% endcode %} @@ -62,7 +62,7 @@ var DSP_HWCLOUD = NewDnsProvider("huaweicloud"); D("example.com", REG_NONE, DnsProvider(DSP_HWCLOUD), A("test", "1.2.3.4"), -END); +); ``` {% endcode %} diff --git a/documentation/provider/internetbs.md b/documentation/provider/internetbs.md index 02f982c341..3727da2809 100644 --- a/documentation/provider/internetbs.md +++ b/documentation/provider/internetbs.md @@ -32,7 +32,7 @@ var REG_INTERNETBS = NewRegistrar("internetbs"); D("example.com", REG_INTERNETBS, NAMESERVER("ns1.example.com."), NAMESERVER("ns2.example.com."), -END); +); ``` {% endcode %} diff --git a/documentation/provider/inwx.md b/documentation/provider/inwx.md index 2470fba5ed..dcd1279acd 100644 --- a/documentation/provider/inwx.md +++ b/documentation/provider/inwx.md @@ -106,6 +106,6 @@ var DSP_CF = NewDnsProvider("cloudflare"); D("example.com", REG_INWX, DnsProvider(DSP_CF), A("test", "1.2.3.4"), -END); +); ``` {% endcode %} diff --git a/documentation/provider/linode.md b/documentation/provider/linode.md index 76834e46b4..090e41f3ae 100644 --- a/documentation/provider/linode.md +++ b/documentation/provider/linode.md @@ -29,7 +29,7 @@ var DSP_LINODE = NewDnsProvider("linode"); D("example.com", REG_NONE, DnsProvider(DSP_LINODE), A("test", "1.2.3.4"), -END); +); ``` {% endcode %} diff --git a/documentation/provider/loopia.md b/documentation/provider/loopia.md index 9b0ce5ae96..b1616ccea0 100644 --- a/documentation/provider/loopia.md +++ b/documentation/provider/loopia.md @@ -1,10 +1,10 @@ Loopia is a 💩 provider of DNS. Using DNSControl hides some of the 💩. If you are stuck with Loopia, hopefully this will reduce the pain. -They provide DNS services, both as a registrar, and a provider. +They provide DNS services, both as a registrar, and a provider. They provide support in English and other regional variants (Norwegian, Serbian, Swedish). -This plugin is based on API documents found at +This plugin is based on API documents found at [https://www.loopia.com/api/](https://www.loopia.com/api/) and by observing API responses. Hat tip to GitHub @hazzeh whose code for the LEGO Loopia implementation was helpful. @@ -50,7 +50,7 @@ Example: "TYPE": "LOOPIA", "username": "your-loopia-api-account-id@loopiaapi", "password": "your-loopia-api-account-password", - "debug": "true" // Set to true for extra debug output. Remove or set to false to prevent extra debug output. + "debug": "true" // Set to true for extra debug output. Remove or set to false to prevent extra debug output. } } ``` @@ -60,7 +60,7 @@ Example: * `username` - string - your @loopiaapi created username * `password` - string - your loopia API password -* `debug` - string - Set to true for extra debug output. Remove or set to false to prevent extra debug output. +* `debug` - string - Set to true for extra debug output. Remove or set to false to prevent extra debug output. * `rate_limit_per` - string - See [Rate Limiting](#rate-limiting) below. * `region` - string - See [Regions](#regions) below. * `modify_name_servers` - string - See [Modify Name Servers](#modify-name-servers) below. @@ -69,7 +69,7 @@ Example: There is no test endpoint. Fly free, grasshopper. Turning on debug will show the XML requests and responses, and include the -username and password from your `creds.json` file. If you want to share these, +username and password from your `creds.json` file. If you want to share these, like for a GitHub issue, be sure to redact those from the XML. ### Fetch Apex NS Entries @@ -114,7 +114,7 @@ This setting defaults to "false" (off). `creds.json` setting: `region` -Loopia operate in a few regions. Norway (`no`), Serbia (`rs`), Sweden (`se`). +Loopia operate in a few regions. Norway (`no`), Serbia (`rs`), Sweden (`se`). For the parameter `region`, specify one of `no`, `rs`, `se`, or omit, or leave empty for the default `se` Sweden. @@ -167,7 +167,7 @@ In your `creds.json` for all `LOOPIA` provider entries: "TYPE": "LOOPIA", "username": "your-loopia-api-account-id@loopiaapi", "password": "your-loopia-api-account-password", - "debug": "true", // Set to true for extra debug output. Remove or set to false to prevent extra debug output. + "debug": "true", // Set to true for extra debug output. Remove or set to false to prevent extra debug output. "rate_limit_per": "Minute" } } @@ -199,7 +199,7 @@ D("example.com", REG_LOOPIA, DnsProvider(DSP_LOOPIA), //NAMESERVER("ns2.loopia.se."), //default A("elk1", "192.0.2.1"), A("test", "192.0.2.2"), -END); +); ``` {% endcode %} @@ -217,7 +217,7 @@ This provider does not recognize any special metadata fields unique to LOOPIA. ## get-zones -`dnscontrol get-zones` is implemented for this provider. +`dnscontrol get-zones` is implemented for this provider. ## New domains diff --git a/documentation/provider/luadns.md b/documentation/provider/luadns.md index 46e0f3418d..8dd8af63f7 100644 --- a/documentation/provider/luadns.md +++ b/documentation/provider/luadns.md @@ -30,7 +30,7 @@ var DSP_LUADNS = NewDnsProvider("luadns"); D("example.com", REG_NONE, DnsProvider(DSP_LUADNS), A("test", "1.2.3.4"), -END); +); ``` {% endcode %} diff --git a/documentation/provider/msdns.md b/documentation/provider/msdns.md index a80b8d1925..c7566fcaa1 100644 --- a/documentation/provider/msdns.md +++ b/documentation/provider/msdns.md @@ -55,6 +55,6 @@ var DSP_MSDNS = NewDnsProvider("msdns"); D("example.com", REG_NONE, DnsProvider(DSP_MSDNS), A("test", "1.2.3.4"), -END) +); ``` {% endcode %} diff --git a/documentation/provider/mythicbeasts.md b/documentation/provider/mythicbeasts.md index bf663c705d..40c65b7fea 100644 --- a/documentation/provider/mythicbeasts.md +++ b/documentation/provider/mythicbeasts.md @@ -34,6 +34,6 @@ var DSP_MYTHIC = NewDnsProvider("mythicbeasts"); D("example.com", REG_NONE, DnsProvider(DSP_MYTHIC), A("test", "1.2.3.4"), -END); +); ``` {% endcode %} diff --git a/documentation/provider/namecheap.md b/documentation/provider/namecheap.md index 1ea060b877..b3c2e1f427 100644 --- a/documentation/provider/namecheap.md +++ b/documentation/provider/namecheap.md @@ -52,7 +52,7 @@ var DSP_BIND = NewDnsProvider("bind"); D("example.com", REG_NAMECHEAP, DnsProvider(DSP_BIND), A("test", "1.2.3.4"), -END); +); ``` {% endcode %} @@ -68,7 +68,7 @@ D("example.com", REG_NAMECHEAP, DnsProvider(DSP_NAMECHEAP), URL("@", "http://example.com/"), URL("www", "http://example.com/"), URL301("backup", "http://backup.example.com/"), -END) +); ``` {% endcode %} diff --git a/documentation/provider/namedotcom.md b/documentation/provider/namedotcom.md index 1735d748dc..949be1bc61 100644 --- a/documentation/provider/namedotcom.md +++ b/documentation/provider/namedotcom.md @@ -45,7 +45,7 @@ var DSP_NAMECOM = NewDnsProvider("name.com"); D("example.com", REG_NAMECOM, DnsProvider(DSP_NAMECOM), A("test", "1.2.3.4"), -END); +); ``` {% endcode %} @@ -59,7 +59,7 @@ var DSP_R53 = NewDnsProvider("r53"); D("example.com", REG_NAMECOM, DnsProvider(DSP_R53), A("test","1.2.3.4"), -END); +); ``` {% endcode %} diff --git a/documentation/provider/netcup.md b/documentation/provider/netcup.md index 2891a07bd0..1e86606679 100644 --- a/documentation/provider/netcup.md +++ b/documentation/provider/netcup.md @@ -28,7 +28,7 @@ var DSP_NETCUP = NewDnsProvider("netcup"); D("example.com", REG_NONE, DnsProvider(DSP_NETCUP), A("test", "1.2.3.4"), -END); +); ``` {% endcode %} diff --git a/documentation/provider/netlify.md b/documentation/provider/netlify.md index 59bf361a98..cf0b5c818c 100644 --- a/documentation/provider/netlify.md +++ b/documentation/provider/netlify.md @@ -31,7 +31,7 @@ var DSP_NETLIFY = NewDnsProvider("netlify"); D("example.com", REG_NETLIFY, DnsProvider(DSP_NETLIFY), A("test", "1.2.3.4"), -END); +); ``` {% endcode %} diff --git a/documentation/provider/ns1.md b/documentation/provider/ns1.md index 391aded8cf..7c588a44e5 100644 --- a/documentation/provider/ns1.md +++ b/documentation/provider/ns1.md @@ -29,6 +29,6 @@ var DSP_NS1 = NewDnsProvider("ns1"); D("example.com", REG_NONE, DnsProvider(DSP_NS1), A("test", "1.2.3.4"), -END); +); ``` {% endcode %} diff --git a/documentation/provider/opensrs.md b/documentation/provider/opensrs.md index 82c068da5c..21278b6bdd 100644 --- a/documentation/provider/opensrs.md +++ b/documentation/provider/opensrs.md @@ -14,6 +14,6 @@ var DSP_OPENSRS = NewDnsProvider("opensrs"); D("example.com", REG_NONE, DnsProvider(DSP_OPENSRS), A("test", "1.2.3.4"), -END); +); ``` {% endcode %} diff --git a/documentation/provider/oracle.md b/documentation/provider/oracle.md index d9fc992293..abe88dde52 100644 --- a/documentation/provider/oracle.md +++ b/documentation/provider/oracle.md @@ -41,7 +41,7 @@ D("example.com", REG_NONE, DnsProvider(DSP_ORACLE), NAMESERVER_TTL(86400), A("test", "1.2.3.4"), -END); +); ``` {% endcode %} diff --git a/documentation/provider/ovh.md b/documentation/provider/ovh.md index 0e95ab79bc..33d9b7a47c 100644 --- a/documentation/provider/ovh.md +++ b/documentation/provider/ovh.md @@ -43,7 +43,7 @@ var DSP_OVH = NewDnsProvider("ovh"); D("example.com", REG_OVH, DnsProvider(DSP_OVH), A("test", "1.2.3.4"), -END); +); ``` {% endcode %} @@ -56,7 +56,7 @@ var DSP_R53 = NewDnsProvider("r53"); D("example.com", REG_OVH, DnsProvider(DSP_R53), A("test", "1.2.3.4"), -END); +); ``` {% endcode %} diff --git a/documentation/provider/packetframe.md b/documentation/provider/packetframe.md index 8f7d8e6b96..a67e490c20 100644 --- a/documentation/provider/packetframe.md +++ b/documentation/provider/packetframe.md @@ -29,6 +29,6 @@ var DSP_PACKETFRAME = NewDnsProvider("packetframe"); D("example.com", REG_NONE, DnsProvider(DSP_PACKETFRAME), A("test", "1.2.3.4"), -END); +); ``` {% endcode %} diff --git a/documentation/provider/porkbun.md b/documentation/provider/porkbun.md index 976579c616..e162842291 100644 --- a/documentation/provider/porkbun.md +++ b/documentation/provider/porkbun.md @@ -32,6 +32,6 @@ var DSP_PORKBUN = NewDnsProvider("porkbun"); D("example.com", REG_NONE, DnsProvider(DSP_PORKBUN), A("test", "1.2.3.4"), -END); +); ``` {% endcode %} diff --git a/documentation/provider/powerdns.md b/documentation/provider/powerdns.md index f0aafd72f7..f451e9ff94 100644 --- a/documentation/provider/powerdns.md +++ b/documentation/provider/powerdns.md @@ -56,7 +56,7 @@ var DSP_POWERDNS = NewDnsProvider("powerdns"); D("example.com", REG_NONE, DnsProvider(DSP_POWERDNS), A("test", "1.2.3.4"), -END); +); ``` {% endcode %} diff --git a/documentation/provider/realtimeregister.md b/documentation/provider/realtimeregister.md index cbddfb90eb..ab41b216e8 100644 --- a/documentation/provider/realtimeregister.md +++ b/documentation/provider/realtimeregister.md @@ -43,6 +43,6 @@ var DSP_RTR = NewDnsProvider("realtimeregister"); D("example.com", REG_RTR, DnsProvider(DSP_RTR), A("test", "1.2.3.4"), -END); +); ``` {% endcode %} diff --git a/documentation/provider/route53.md b/documentation/provider/route53.md index 9b071a6bf8..2d0f1925ad 100644 --- a/documentation/provider/route53.md +++ b/documentation/provider/route53.md @@ -74,7 +74,7 @@ var DSP_R53 = NewDnsProvider("r53_main"); D("example.com", REG_NONE, DnsProvider(DSP_R53), A("test", "1.2.3.4"), -END); +); ``` {% endcode %} @@ -94,13 +94,13 @@ D("testzone.net!private", REG_NONE, DnsProvider(DSP_R53), R53_ZONE("Z111111111JCCCP1V7UW"), TXT("me", "private testzone.net"), -END); +); D("testzone.net!public", REG_NONE, DnsProvider(DSP_R53), R53_ZONE("Z222222222INNG98SHJQ2"), TXT("me", "public testzone.net"), -END); +); ``` {% endcode %} diff --git a/documentation/provider/rwth.md b/documentation/provider/rwth.md index 1bae309e7a..06ea021695 100644 --- a/documentation/provider/rwth.md +++ b/documentation/provider/rwth.md @@ -29,7 +29,7 @@ var DSP_RWTH = NewDnsProvider("rwth"); D("example.rwth-aachen.de", REG_NONE, DnsProvider(DSP_RWTH), A("test", "1.2.3.4"), -END); +); ``` {% endcode %} diff --git a/documentation/provider/sakuracloud.md b/documentation/provider/sakuracloud.md index 275649a9a7..f7fb2bf1d6 100644 --- a/documentation/provider/sakuracloud.md +++ b/documentation/provider/sakuracloud.md @@ -63,7 +63,7 @@ var DSP_SAKURACLOUD = NewDnsProvider("sakuracloud"); D("example.com", REG_NONE, DnsProvider(DSP_SAKURACLOUD), A("test", "192.0.2.1"), -END); +); ``` {% endcode %} diff --git a/documentation/provider/softlayer.md b/documentation/provider/softlayer.md index ce6643afb5..9f0cd58c09 100644 --- a/documentation/provider/softlayer.md +++ b/documentation/provider/softlayer.md @@ -37,7 +37,7 @@ var DSP_SOFTLAYER = NewDnsProvider("softlayer"); D("example.com", REG_NONE, DnsProvider(DSP_SOFTLAYER), A("test", "1.2.3.4"), -END); +); ``` {% endcode %} @@ -54,6 +54,6 @@ D("example.com", REG_NONE, DnsProvider(SOFTLAYER), NAMESERVER_TTL(86400), A("test", "1.2.3.4"), -END); +); ``` {% endcode %} diff --git a/documentation/provider/transip.md b/documentation/provider/transip.md index a7017cdf6f..624ace0bc4 100644 --- a/documentation/provider/transip.md +++ b/documentation/provider/transip.md @@ -52,7 +52,7 @@ var DSP_TRANSIP = NewDnsProvider("transip"); D("example.com", REG_NONE, DnsProvider(DSP_TRANSIP), A("test", "1.2.3.4"), -END); +); ``` {% endcode %} diff --git a/documentation/provider/vultr.md b/documentation/provider/vultr.md index 8b34a8d865..42a91b0991 100644 --- a/documentation/provider/vultr.md +++ b/documentation/provider/vultr.md @@ -30,7 +30,7 @@ var DSP_VULTR = NewDnsProvider("vultr"); D("example.com", REG_DNSIMPLE, DnsProvider(DSP_VULTR), A("test", "1.2.3.4"), -END); +); ``` {% endcode %} diff --git a/documentation/styleguide-doc.md b/documentation/styleguide-doc.md index af260fb039..dbbff9ead1 100644 --- a/documentation/styleguide-doc.md +++ b/documentation/styleguide-doc.md @@ -122,7 +122,7 @@ var DNS_BIND = NewDnsProvider("bind"); D("example.com", REG_NONE, DnsProvider(DNS_BIND), A("@", "1.2.3.4"), -END); +); ``` {% endcode %}