From 4f46b3163a9442ec6fd9b6f0583c011e0ebc0854 Mon Sep 17 00:00:00 2001 From: Paul Date: Sat, 18 Mar 2023 22:31:25 +0100 Subject: [PATCH] TOC builder function for documentation Update documentation procedures Fixes (links from relative to 'absolute') --- build/generate/docuTOC.go | 175 ++++++++++++++++++ build/generate/featureMatrix.go | 24 +-- build/generate/functionTypes.go | 39 +++- build/generate/generate.go | 3 + .../{ => 01_getting_started}/examples.md | 0 .../getting_started.md} | 0 .../migrating_zones_to_dnscontrol.md} | 0 ...eScript_autocomplete_and_type_checking.md} | 0 ..._MX,_S_targets_require_the_final_\".\".md" | 0 .../domain_modifier_functions}/A.md | 2 +- .../domain_modifier_functions}/AAAA.md | 0 .../domain_modifier_functions}/ALIAS.md | 0 .../AUTODNSSEC_OFF.md | 0 .../AUTODNSSEC_ON.md | 0 .../domain_modifier_functions}/CAA.md | 2 +- .../domain_modifier_functions}/CNAME.md | 0 .../domain_modifier_functions}/DS.md | 0 .../domain_modifier_functions/DefaultTTL.md | 26 +++ .../domain_modifier_functions}/DnsProvider.md | 2 +- .../domain_modifier_functions}/FRAME.md | 0 .../domain_modifier_functions}/IGNORE.md | 0 .../domain_modifier_functions}/IGNORE_NAME.md | 0 .../IGNORE_TARGET.md | 0 .../IMPORT_TRANSFORM.md | 0 .../domain_modifier_functions}/INCLUDE.md | 0 .../domain_modifier_functions}/LOC.md | 8 +- .../domain_modifier_functions}/MX.md | 0 .../domain_modifier_functions}/NAMESERVER.md | 0 .../NAMESERVER_TTL.md | 4 +- .../domain_modifier_functions}/NAPTR.md | 0 .../domain_modifier_functions}/NO_PURGE.md | 0 .../domain_modifier_functions}/NS.md | 0 .../domain_modifier_functions}/PTR.md | 2 +- .../domain_modifier_functions}/PURGE.md | 0 .../domain_modifier_functions}/SOA.md | 0 .../domain_modifier_functions}/SRV.md | 0 .../domain_modifier_functions}/SSHFP.md | 0 .../domain_modifier_functions}/TLSA.md | 0 .../domain_modifier_functions}/TXT.md | 2 +- .../domain_modifier_functions}/URL.md | 0 .../domain_modifier_functions}/URL301.md | 0 .../ClouDNS}/CLOUDNS_WR.md | 0 .../NS1}/NS1_URLFWD.md | 0 .../akamai_edge_dns}/AKAMAICDN.md | 0 .../amazon_route_53}/R53_ALIAS.md | 2 +- .../azure_dns}/AZURE_ALIAS.md | 0 .../cloudflare_dns}/CF_REDIRECT.md | 0 .../cloudflare_dns}/CF_TEMP_REDIRECT.md | 0 .../cloudflare_dns}/CF_WORKER_ROUTE.md | 0 .../service_provider_specific/ignore-me.md | 0 .../{ => 02_language_reference}/js.md | 0 .../record_modifier_functions}/CAA_BUILDER.md | 2 +- .../DMARC_BUILDER.md | 0 .../LOC_BUILDER_DD.md | 74 ++++++++ .../LOC_BUILDER_DMM_STR.md | 54 ++++++ .../LOC_BUILDER_DMS_STR.md | 14 +- .../LOC_BUILDER_STR.md | 61 ++++++ .../record_modifier_functions}/SPF_BUILDER.md | 0 .../record_modifier_functions}/TTL.md | 2 +- .../amazon_route_53}/R53_ZONE.md | 2 +- .../service_provider_specific/ignore-me.md | 0 .../top_level_functions}/D.md | 2 +- .../top_level_functions}/DEFAULTS.md | 2 +- .../top_level_functions}/DOMAIN_ELSEWHERE.md | 2 +- .../DOMAIN_ELSEWHERE_AUTO.md | 2 +- .../top_level_functions}/D_EXTEND.md | 2 +- .../top_level_functions}/FETCH.md | 0 .../top_level_functions}/IP.md | 0 .../top_level_functions}/NewDnsProvider.md | 0 .../top_level_functions}/NewRegistrar.md | 0 .../top_level_functions}/PANIC.md | 0 .../top_level_functions}/REV.md | 2 +- .../getConfiguredDomains.md | 0 .../top_level_functions}/require.md | 0 .../top_level_functions}/require_glob.md | 0 documentation/SUMMARY.md | 3 + .../CI-CD_example_for_GitLab.md} | 0 .../CLI_variables.md} | 0 .../code_tricks.md} | 0 .../{ => advanced_features}/nameservers.md | 0 .../{ => advanced_features}/notifications.md | 0 documentation/{ => commands}/check-creds.md | 0 documentation/{ => commands}/creds-json.md | 0 documentation/{ => commands}/get-certs.md | 0 documentation/{ => commands}/get-zones.md | 0 .../DNSControl_is_an_opinionated_system.md} | 0 .../alias_records.md} | 0 .../bring-your-own-secrets.md} | 0 .../bug_triage_process.md} | 0 .../creating_new_rtypes.md} | 34 +--- .../debugging_with_dlv.md} | 0 .../integration_tests.md} | 0 .../txt_record_testing.md} | 0 .../unit_testing_dns_data.md} | 0 .../writing_new_providers.md} | 0 documentation/functions/domain/DefaultTTL.md | 26 --- .../functions/record/LOC_BUILDER_DD.md | 74 -------- .../functions/record/LOC_BUILDER_DMM_STR.md | 54 ------ .../functions/record/LOC_BUILDER_STR.md | 61 ------ documentation/index.md | 2 +- documentation/{ => providers}/providers.md | 0 .../akamai_edge_dns.md} | 0 .../amazon_route53.md} | 0 .../providers/{ => providers}/autodns.md | 0 .../{axfrddns.md => providers/axfr+ddns.md} | 0 .../providers/{ => providers}/azure_dns.md | 0 .../providers/{ => providers}/bind.md | 0 .../cloudflare_api.md} | 0 .../providers/{ => providers}/cloudns.md | 0 .../{cscglobal.md => providers/csc_global.md} | 0 .../providers/{ => providers}/desec.md | 0 .../providers/{ => providers}/digitalocean.md | 0 .../providers/{ => providers}/dnsimple.md | 0 .../providers/{ => providers}/dnsmadeeasy.md | 0 .../providers/{ => providers}/dnsoverhttps.md | 0 .../{ => providers}/domainnameshop.md | 0 .../providers/{ => providers}/easyname.md | 0 .../providers/{ => providers}/gandi_v5.md | 0 .../providers/{ => providers}/gcloud.md | 0 .../providers/{ => providers}/gcore.md | 0 .../providers/{ => providers}/hetzner.md | 0 .../providers/{ => providers}/hexonet.md | 0 .../{hostingde.md => providers/hosting.de.md} | 0 .../hurricane_electric_dns.md} | 0 .../internet.bs.md} | 0 .../providers/{ => providers}/inwx.md | 0 .../providers/{ => providers}/linode.md | 0 .../providers/{ => providers}/loopia.md | 0 .../providers/{ => providers}/luadns.md | 0 .../microsoft_dns_server.md} | 0 .../{namedotcom.md => providers/name.com.md} | 0 .../providers/{ => providers}/namecheap.md | 0 .../providers/{ => providers}/netcup.md | 0 .../providers/{ => providers}/netlify.md | 0 .../providers/{ => providers}/ns1.md | 0 .../{oracle.md => providers/oracle_cloud.md} | 0 .../providers/{ => providers}/ovh.md | 0 .../providers/{ => providers}/packetframe.md | 0 .../providers/{ => providers}/porkbun.md | 0 .../providers/{ => providers}/powerdns.md | 0 .../providers/{ => providers}/rwth.md | 0 .../providers/{ => providers}/softlayer.md | 0 .../providers/{ => providers}/transip.md | 0 .../providers/{ => providers}/vultr.md | 0 .../{v316.md => release/changelog_to_v316.md} | 0 .../how_to_build_and_ship_a_release.md} | 0 main.go | 2 +- 147 files changed, 476 insertions(+), 292 deletions(-) create mode 100644 build/generate/docuTOC.go rename documentation/{ => 01_getting_started}/examples.md (100%) rename documentation/{getting-started.md => 01_getting_started/getting_started.md} (100%) rename documentation/{migrating.md => 01_getting_started/migrating_zones_to_dnscontrol.md} (100%) rename documentation/{typescript.md => 01_getting_started/typeScript_autocomplete_and_type_checking.md} (100%) rename documentation/why-the-dot.md => "documentation/02_language_reference/Why_CNAME,_MX,_S_targets_require_the_final_\".\".md" (100%) rename documentation/{functions/domain => 02_language_reference/domain_modifier_functions}/A.md (92%) rename documentation/{functions/domain => 02_language_reference/domain_modifier_functions}/AAAA.md (100%) rename documentation/{functions/domain => 02_language_reference/domain_modifier_functions}/ALIAS.md (100%) rename documentation/{functions/domain => 02_language_reference/domain_modifier_functions}/AUTODNSSEC_OFF.md (100%) rename documentation/{functions/domain => 02_language_reference/domain_modifier_functions}/AUTODNSSEC_ON.md (100%) rename documentation/{functions/domain => 02_language_reference/domain_modifier_functions}/CAA.md (79%) rename documentation/{functions/domain => 02_language_reference/domain_modifier_functions}/CNAME.md (100%) rename documentation/{functions/domain => 02_language_reference/domain_modifier_functions}/DS.md (100%) create mode 100644 documentation/02_language_reference/domain_modifier_functions/DefaultTTL.md rename documentation/{functions/domain => 02_language_reference/domain_modifier_functions}/DnsProvider.md (94%) rename documentation/{functions/domain => 02_language_reference/domain_modifier_functions}/FRAME.md (100%) rename documentation/{functions/domain => 02_language_reference/domain_modifier_functions}/IGNORE.md (100%) rename documentation/{functions/domain => 02_language_reference/domain_modifier_functions}/IGNORE_NAME.md (100%) rename documentation/{functions/domain => 02_language_reference/domain_modifier_functions}/IGNORE_TARGET.md (100%) rename documentation/{functions/domain => 02_language_reference/domain_modifier_functions}/IMPORT_TRANSFORM.md (100%) rename documentation/{functions/domain => 02_language_reference/domain_modifier_functions}/INCLUDE.md (100%) rename documentation/{functions/domain => 02_language_reference/domain_modifier_functions}/LOC.md (83%) rename documentation/{functions/domain => 02_language_reference/domain_modifier_functions}/MX.md (100%) rename documentation/{functions/domain => 02_language_reference/domain_modifier_functions}/NAMESERVER.md (100%) rename documentation/{functions/domain => 02_language_reference/domain_modifier_functions}/NAMESERVER_TTL.md (81%) rename documentation/{functions/domain => 02_language_reference/domain_modifier_functions}/NAPTR.md (100%) rename documentation/{functions/domain => 02_language_reference/domain_modifier_functions}/NO_PURGE.md (100%) rename documentation/{functions/domain => 02_language_reference/domain_modifier_functions}/NS.md (100%) rename documentation/{functions/domain => 02_language_reference/domain_modifier_functions}/PTR.md (97%) rename documentation/{functions/domain => 02_language_reference/domain_modifier_functions}/PURGE.md (100%) rename documentation/{functions/domain => 02_language_reference/domain_modifier_functions}/SOA.md (100%) rename documentation/{functions/domain => 02_language_reference/domain_modifier_functions}/SRV.md (100%) rename documentation/{functions/domain => 02_language_reference/domain_modifier_functions}/SSHFP.md (100%) rename documentation/{functions/domain => 02_language_reference/domain_modifier_functions}/TLSA.md (100%) rename documentation/{functions/domain => 02_language_reference/domain_modifier_functions}/TXT.md (98%) rename documentation/{functions/domain => 02_language_reference/domain_modifier_functions}/URL.md (100%) rename documentation/{functions/domain => 02_language_reference/domain_modifier_functions}/URL301.md (100%) rename documentation/{functions/domain => 02_language_reference/domain_modifier_functions/service_provider_specific/ClouDNS}/CLOUDNS_WR.md (100%) rename documentation/{functions/domain => 02_language_reference/domain_modifier_functions/service_provider_specific/NS1}/NS1_URLFWD.md (100%) rename documentation/{functions/domain => 02_language_reference/domain_modifier_functions/service_provider_specific/akamai_edge_dns}/AKAMAICDN.md (100%) rename documentation/{functions/domain => 02_language_reference/domain_modifier_functions/service_provider_specific/amazon_route_53}/R53_ALIAS.md (96%) rename documentation/{functions/domain => 02_language_reference/domain_modifier_functions/service_provider_specific/azure_dns}/AZURE_ALIAS.md (100%) rename documentation/{functions/domain => 02_language_reference/domain_modifier_functions/service_provider_specific/cloudflare_dns}/CF_REDIRECT.md (100%) rename documentation/{functions/domain => 02_language_reference/domain_modifier_functions/service_provider_specific/cloudflare_dns}/CF_TEMP_REDIRECT.md (100%) rename documentation/{functions/domain => 02_language_reference/domain_modifier_functions/service_provider_specific/cloudflare_dns}/CF_WORKER_ROUTE.md (100%) create mode 100644 documentation/02_language_reference/domain_modifier_functions/service_provider_specific/ignore-me.md rename documentation/{ => 02_language_reference}/js.md (100%) rename documentation/{functions/record => 02_language_reference/record_modifier_functions}/CAA_BUILDER.md (93%) rename documentation/{functions/record => 02_language_reference/record_modifier_functions}/DMARC_BUILDER.md (100%) create mode 100644 documentation/02_language_reference/record_modifier_functions/LOC_BUILDER_DD.md create mode 100644 documentation/02_language_reference/record_modifier_functions/LOC_BUILDER_DMM_STR.md rename documentation/{functions/record => 02_language_reference/record_modifier_functions}/LOC_BUILDER_DMS_STR.md (51%) create mode 100644 documentation/02_language_reference/record_modifier_functions/LOC_BUILDER_STR.md rename documentation/{functions/record => 02_language_reference/record_modifier_functions}/SPF_BUILDER.md (100%) rename documentation/{functions/record => 02_language_reference/record_modifier_functions}/TTL.md (89%) rename documentation/{functions/record => 02_language_reference/record_modifier_functions/service_provider_specific/amazon_route_53}/R53_ZONE.md (72%) create mode 100644 documentation/02_language_reference/record_modifier_functions/service_provider_specific/ignore-me.md rename documentation/{functions/global => 02_language_reference/top_level_functions}/D.md (94%) rename documentation/{functions/global => 02_language_reference/top_level_functions}/DEFAULTS.md (88%) rename documentation/{functions/global => 02_language_reference/top_level_functions}/DOMAIN_ELSEWHERE.md (89%) rename documentation/{functions/global => 02_language_reference/top_level_functions}/DOMAIN_ELSEWHERE_AUTO.md (89%) rename documentation/{functions/global => 02_language_reference/top_level_functions}/D_EXTEND.md (91%) rename documentation/{functions/global => 02_language_reference/top_level_functions}/FETCH.md (100%) rename documentation/{functions/global => 02_language_reference/top_level_functions}/IP.md (100%) rename documentation/{functions/global => 02_language_reference/top_level_functions}/NewDnsProvider.md (100%) rename documentation/{functions/global => 02_language_reference/top_level_functions}/NewRegistrar.md (100%) rename documentation/{functions/global => 02_language_reference/top_level_functions}/PANIC.md (100%) rename documentation/{functions/global => 02_language_reference/top_level_functions}/REV.md (93%) rename documentation/{functions/global => 02_language_reference/top_level_functions}/getConfiguredDomains.md (100%) rename documentation/{functions/global => 02_language_reference/top_level_functions}/require.md (100%) rename documentation/{functions/global => 02_language_reference/top_level_functions}/require_glob.md (100%) rename documentation/{ci-cd-gitlab.md => advanced_features/CI-CD_example_for_GitLab.md} (100%) rename documentation/{cli-variables.md => advanced_features/CLI_variables.md} (100%) rename documentation/{code-tricks.md => advanced_features/code_tricks.md} (100%) rename documentation/{ => advanced_features}/nameservers.md (100%) rename documentation/{ => advanced_features}/notifications.md (100%) rename documentation/{ => commands}/check-creds.md (100%) rename documentation/{ => commands}/creds-json.md (100%) rename documentation/{ => commands}/get-certs.md (100%) rename documentation/{ => commands}/get-zones.md (100%) rename documentation/{opinions.md => developer_info/DNSControl_is_an_opinionated_system.md} (100%) rename documentation/{alias.md => developer_info/alias_records.md} (100%) rename documentation/{byo-secrets.md => developer_info/bring-your-own-secrets.md} (100%) rename documentation/{bug-triage.md => developer_info/bug_triage_process.md} (100%) rename documentation/{adding-new-rtypes.md => developer_info/creating_new_rtypes.md} (89%) rename documentation/{debugging-with-dlv.md => developer_info/debugging_with_dlv.md} (100%) rename documentation/{integration-tests.md => developer_info/integration_tests.md} (100%) rename documentation/{testing-txt-records.md => developer_info/txt_record_testing.md} (100%) rename documentation/{unittests.md => developer_info/unit_testing_dns_data.md} (100%) rename documentation/{writing-providers.md => developer_info/writing_new_providers.md} (100%) delete mode 100644 documentation/functions/domain/DefaultTTL.md delete mode 100644 documentation/functions/record/LOC_BUILDER_DD.md delete mode 100644 documentation/functions/record/LOC_BUILDER_DMM_STR.md delete mode 100644 documentation/functions/record/LOC_BUILDER_STR.md rename documentation/{ => providers}/providers.md (100%) rename documentation/providers/{akamaiedgedns.md => providers/akamai_edge_dns.md} (100%) rename documentation/providers/{route53.md => providers/amazon_route53.md} (100%) rename documentation/providers/{ => providers}/autodns.md (100%) rename documentation/providers/{axfrddns.md => providers/axfr+ddns.md} (100%) rename documentation/providers/{ => providers}/azure_dns.md (100%) rename documentation/providers/{ => providers}/bind.md (100%) rename documentation/providers/{cloudflareapi.md => providers/cloudflare_api.md} (100%) rename documentation/providers/{ => providers}/cloudns.md (100%) rename documentation/providers/{cscglobal.md => providers/csc_global.md} (100%) rename documentation/providers/{ => providers}/desec.md (100%) rename documentation/providers/{ => providers}/digitalocean.md (100%) rename documentation/providers/{ => providers}/dnsimple.md (100%) rename documentation/providers/{ => providers}/dnsmadeeasy.md (100%) rename documentation/providers/{ => providers}/dnsoverhttps.md (100%) rename documentation/providers/{ => providers}/domainnameshop.md (100%) rename documentation/providers/{ => providers}/easyname.md (100%) rename documentation/providers/{ => providers}/gandi_v5.md (100%) rename documentation/providers/{ => providers}/gcloud.md (100%) rename documentation/providers/{ => providers}/gcore.md (100%) rename documentation/providers/{ => providers}/hetzner.md (100%) rename documentation/providers/{ => providers}/hexonet.md (100%) rename documentation/providers/{hostingde.md => providers/hosting.de.md} (100%) rename documentation/providers/{hedns.md => providers/hurricane_electric_dns.md} (100%) rename documentation/providers/{internetbs.md => providers/internet.bs.md} (100%) rename documentation/providers/{ => providers}/inwx.md (100%) rename documentation/providers/{ => providers}/linode.md (100%) rename documentation/providers/{ => providers}/loopia.md (100%) rename documentation/providers/{ => providers}/luadns.md (100%) rename documentation/providers/{msdns.md => providers/microsoft_dns_server.md} (100%) rename documentation/providers/{namedotcom.md => providers/name.com.md} (100%) rename documentation/providers/{ => providers}/namecheap.md (100%) rename documentation/providers/{ => providers}/netcup.md (100%) rename documentation/providers/{ => providers}/netlify.md (100%) rename documentation/providers/{ => providers}/ns1.md (100%) rename documentation/providers/{oracle.md => providers/oracle_cloud.md} (100%) rename documentation/providers/{ => providers}/ovh.md (100%) rename documentation/providers/{ => providers}/packetframe.md (100%) rename documentation/providers/{ => providers}/porkbun.md (100%) rename documentation/providers/{ => providers}/powerdns.md (100%) rename documentation/providers/{ => providers}/rwth.md (100%) rename documentation/providers/{ => providers}/softlayer.md (100%) rename documentation/providers/{ => providers}/transip.md (100%) rename documentation/providers/{ => providers}/vultr.md (100%) rename documentation/{v316.md => release/changelog_to_v316.md} (100%) rename documentation/{release-engineering.md => release/how_to_build_and_ship_a_release.md} (100%) diff --git a/build/generate/docuTOC.go b/build/generate/docuTOC.go new file mode 100644 index 0000000000..a70bbe0b61 --- /dev/null +++ b/build/generate/docuTOC.go @@ -0,0 +1,175 @@ +package main + +import ( + "fmt" + "os" + "path/filepath" + "sort" + "strings" +) + +const ( + startMarker = "\n" + endMarker = "" +) + +func generateDocuTOC(folderPath string) error { + if folderPath == "" { + return fmt.Errorf("Empty docutoc path") + } + + // Find all the markdown files in the specified folder and its subfolders. + markdownFiles, err := findMarkdownFiles(folderPath) + if err != nil { + return err + } + + //First sort by folders, then by filename. + sort.SliceStable(markdownFiles, func(i, j int) bool { + if filepath.Dir(markdownFiles[i]) == filepath.Dir(markdownFiles[j]) { + return strings.ToLower(markdownFiles[i]) < strings.ToLower(markdownFiles[j]) + } else { + return filepath.Dir(strings.ToLower(markdownFiles[i])) < filepath.Dir(strings.ToLower(markdownFiles[j])) + } + }) + + // Create the table of contents. + toc := generateTableOfContents(folderPath, markdownFiles) + + err = replaceTextBetweenMarkers(filepath.Join(folderPath, "SUMMARY.md"), startMarker, endMarker, toc) + if err != nil { + return err + } + + return nil +} + +// func stringInSlice(a string, list []string) bool { +// for _, b := range list { +// if b == a { +// return true +// } +// } +// return false +// } + +func generateTableOfContents(folderPath string, markdownFiles []string) string { + var toc strings.Builder + currentFolder := "" + + // skip over these root entries (dont print these "#" headings) + rootFolderExceptions := []string{ + "documentation", + } + + // dont print these folder names as bullets (which lack a link) + folderExceptions := []string{ + "providers", + } + // dont print these file names as bullets + fileExceptions := []string{ + "js.md", + "index.md", + "summary.md", + "ignore-me.md", + } + + for _, file := range markdownFiles { + //depthCount is folder depth for toc indentation, minus one for docu folder + depthCount := strings.Count(file, string(filepath.Separator)) - 1 + filename := filepath.Base(file) + + fileFolder := filepath.Dir(file) + if fileFolder != currentFolder { + // we are in a new folder + + // hop over these entries altogether + if stringInSlice(strings.ToLower(fileFolder), rootFolderExceptions) { + continue + } + currentFolder = fileFolder + folderName := filepath.Base(currentFolder) + + // if we're in an "exception" folder, deeper than a heading "#", skip printing it + // this has the effect of putting subentries under an entry that is already a link, + // without printing an entry to represent the folder name that is not a link + // e.g. provider md files are all links, under the provider.md file which is a link + if stringInSlice(strings.ToLower(folderName), folderExceptions) && depthCount > 1 { + continue + } else { + if depthCount > 1 { + // if we're deeper in heirarchy, print an indented bullet "*" to add to bullet heirarchy + toc.WriteString(strings.Repeat(" ", depthCount-1) + "* ") + } else { + // If we're in folder root, just print an unindented heading "#" + toc.WriteString("\n\n## ") + } + // Captalize folder names, replace underscores with spaces for # headings + toc.WriteString(strings.Title(strings.ReplaceAll(folderName, "_", " ")) + "\n") + } + } + //if the file is an exception listed above, skip it. + if stringInSlice(strings.ToLower(filename), fileExceptions) { + continue + } + + // naming exceptions - function names shall retain "_" + displayfilename := strings.TrimSuffix(filename, filepath.Ext(filename)) + if !strings.Contains(file, "functions") { + displayfilename = strings.Title(strings.ReplaceAll(displayfilename, "_", " ")) + } + + // print the filename as a bullet, and as a [link](hyperlink) + toc.WriteString(strings.Repeat(" ", depthCount)) + toc.WriteString("* [" + displayfilename + "](" + filepath.Join(".", strings.ReplaceAll(file, folderPath, "")) + ")\n") + } + return toc.String() +} + +// replaceTextBetweenMarkers inserts the generated table of contents between the two markers in the specified markdown file. +func replaceTextBetweenMarkers(targetFile, startMarker, endMarker, newcontent string) error { + // Read the contents of the markdown file into memory. + input, err := os.ReadFile(targetFile) + if err != nil { + return err + } + + // Find the starting and ending positions of the table of contents markers. + startPos := strings.Index(string(input), startMarker) + if startPos == -1 { + return fmt.Errorf("could not find start marker %q in file %q", startMarker, targetFile) + } + endPos := strings.Index(string(input), endMarker) + if endPos == -1 { + return fmt.Errorf("could not find end marker %q in file %q", endMarker, targetFile) + } + + // Construct the new contents of the markdown file with the updated table of contents. + output := string(input[:startPos+len(startMarker)]) + newcontent + string(input[endPos:]) + + // Write the updated contents to the markdown file. + err = os.WriteFile(targetFile, []byte(output), 0644) + if err != nil { + return err + } + + return nil +} + +// findMarkdownFiles returns a list of all the markdown files in the specified folder and its subfolders. +func findMarkdownFiles(folderPath string) ([]string, error) { + markdownFiles := make([]string, 0) + err := filepath.Walk(folderPath, func(path string, info os.FileInfo, err error) error { + if err != nil { + return err + } + if !info.IsDir() && filepath.Ext(path) == ".md" { + markdownFiles = append(markdownFiles, path) + } + return nil + }) + if err != nil { + return nil, err + } + return markdownFiles, err +} diff --git a/build/generate/featureMatrix.go b/build/generate/featureMatrix.go index 35a74adaf6..4642597089 100644 --- a/build/generate/featureMatrix.go +++ b/build/generate/featureMatrix.go @@ -76,20 +76,20 @@ func matrixData() *FeatureMatrix { OfficialSupport = "Official Support" // vs. community supported ProviderDNSProvider = "DNS Provider" ProviderRegistrar = "Registrar" - DomainModifierAlias = "[`ALIAS`](functions/domain/ALIAS.md)" - DomainModifierCaa = "[`CAA`](functions/domain/CAA.md)" - DomainModifierDnssec = "[`AUTODNSSEC`](functions/domain/AUTODNSSEC_ON.md)" - DomainModifierLoc = "[`LOC`](functions/domain/LOC.md)" - DomainModifierNaptr = "[`NAPTR`](functions/domain/NAPTR.md)" - DomainModifierPtr = "[`PTR`](functions/domain/PTR.md)" - DomainModifierSoa = "[`SOA`](functions/domain/SOA.md)" - DomainModifierSrv = "[`SRV`](functions/domain/SRV.md)" - DomainModifierSshfp = "[`SSHFP`](functions/domain/SSHFP.md)" - DomainModifierTlsa = "[`TLSA`](functions/domain/TLSA.md)" - DomainModifierDs = "[`DS`](functions/domain/DS.md)" + DomainModifierAlias = "[`ALIAS`](02_language_reference/domain_modifier_functions/ALIAS.md)" + DomainModifierCaa = "[`CAA`](02_language_reference/domain_modifier_functions/CAA.md)" + DomainModifierDnssec = "[`AUTODNSSEC`](02_language_reference/domain_modifier_functions/AUTODNSSEC_ON.md)" + DomainModifierLoc = "[`LOC`](02_language_reference/domain_modifier_functions/LOC.md)" + DomainModifierNaptr = "[`NAPTR`](02_language_reference/domain_modifier_functions/NAPTR.md)" + DomainModifierPtr = "[`PTR`](02_language_reference/domain_modifier_functions/PTR.md)" + DomainModifierSoa = "[`SOA`](02_language_reference/domain_modifier_functions/SOA.md)" + DomainModifierSrv = "[`SRV`](02_language_reference/domain_modifier_functions/SRV.md)" + DomainModifierSshfp = "[`SSHFP`](02_language_reference/domain_modifier_functions/SSHFP.md)" + DomainModifierTlsa = "[`TLSA`](02_language_reference/domain_modifier_functions/TLSA.md)" + DomainModifierDs = "[`DS`](02_language_reference/domain_modifier_functions/DS.md)" DualHost = "dual host" CreateDomains = "create-domains" - NoPurge = "[`NO_PURGE`](functions/domain/NO_PURGE.md)" + NoPurge = "[`NO_PURGE`](02_language_reference/domain_modifier_functions/NO_PURGE.md)" GetZones = "get-zones" ) diff --git a/build/generate/functionTypes.go b/build/generate/functionTypes.go index ad508acc72..9da3a0ef07 100644 --- a/build/generate/functionTypes.go +++ b/build/generate/functionTypes.go @@ -49,20 +49,45 @@ func parseFrontMatter(content string) (map[string]interface{}, string, error) { } var returnTypes = map[string]string{ - "domain": "DomainModifier", - "global": "void", - "record": "RecordModifier", + "domain_modifier_functions": "DomainModifier", + "top_level_functions": "void", + "record_modifier_functions": "RecordModifier", +} + +func stringInSlice(a string, list []string) bool { + for _, b := range list { + if b == a { + return true + } + } + return false } func generateFunctionTypes() (string, error) { funcs := []Function{} + folderExceptions := []string{ + ".DS_Store", + "js.md", + } + fileExceptions := []string{ + ".DS_Store", + "js.md", + // appears in TOC, but not needed here. it's just in the same folder. + "Why_CNAME,_MX,_S_targets_require_the_final_\".\".md", + } - srcRoot := join("documentation", "functions") + srcRoot := join("documentation", "02_language_reference") types, err := os.ReadDir(srcRoot) if err != nil { return "", err } for _, t := range types { + if stringInSlice(t.Name(), folderExceptions) { + continue + } + if stringInSlice(t.Name(), fileExceptions) { + continue + } if !t.IsDir() { return "", errors.New("not a directory: " + join(srcRoot, t.Name())) } @@ -73,9 +98,13 @@ func generateFunctionTypes() (string, error) { } for _, f := range funcNames { + if stringInSlice(f.Name(), fileExceptions) { + continue + } fPath := join(tPath, f.Name()) if f.IsDir() { - return "", errors.New("not a file: " + fPath) + // return "", errors.New("not a file: " + fPath) + continue } // println("Processing", fPath) content, err := os.ReadFile(fPath) diff --git a/build/generate/generate.go b/build/generate/generate.go index 4753aed486..69a8af8304 100644 --- a/build/generate/generate.go +++ b/build/generate/generate.go @@ -13,4 +13,7 @@ func main() { if err := generateDTSFile(funcs); err != nil { log.Fatal(err) } + if err := generateDocuTOC("documentation"); err != nil { + log.Fatal(err) + } } diff --git a/documentation/examples.md b/documentation/01_getting_started/examples.md similarity index 100% rename from documentation/examples.md rename to documentation/01_getting_started/examples.md diff --git a/documentation/getting-started.md b/documentation/01_getting_started/getting_started.md similarity index 100% rename from documentation/getting-started.md rename to documentation/01_getting_started/getting_started.md diff --git a/documentation/migrating.md b/documentation/01_getting_started/migrating_zones_to_dnscontrol.md similarity index 100% rename from documentation/migrating.md rename to documentation/01_getting_started/migrating_zones_to_dnscontrol.md diff --git a/documentation/typescript.md b/documentation/01_getting_started/typeScript_autocomplete_and_type_checking.md similarity index 100% rename from documentation/typescript.md rename to documentation/01_getting_started/typeScript_autocomplete_and_type_checking.md diff --git a/documentation/why-the-dot.md "b/documentation/02_language_reference/Why_CNAME,_MX,_S_targets_require_the_final_\".\".md" similarity index 100% rename from documentation/why-the-dot.md rename to "documentation/02_language_reference/Why_CNAME,_MX,_S_targets_require_the_final_\".\".md" diff --git a/documentation/functions/domain/A.md b/documentation/02_language_reference/domain_modifier_functions/A.md similarity index 92% rename from documentation/functions/domain/A.md rename to documentation/02_language_reference/domain_modifier_functions/A.md index 28eac09371..434dca67b4 100644 --- a/documentation/functions/domain/A.md +++ b/documentation/02_language_reference/domain_modifier_functions/A.md @@ -12,7 +12,7 @@ parameter_types: A adds an A record To a domain. The name should be the relative label for the record. Use `@` for the domain apex. -The address should be an ip address, either a string, or a numeric value obtained via [IP](../global/IP.md). +The address should be an ip address, either a string, or a numeric value obtained via [IP](../top_level_functions/IP.md). Modifiers can be any number of [record modifiers](https://docs.dnscontrol.org/language-reference/record-modifiers) or JSON objects, which will be merged into the record's metadata. diff --git a/documentation/functions/domain/AAAA.md b/documentation/02_language_reference/domain_modifier_functions/AAAA.md similarity index 100% rename from documentation/functions/domain/AAAA.md rename to documentation/02_language_reference/domain_modifier_functions/AAAA.md diff --git a/documentation/functions/domain/ALIAS.md b/documentation/02_language_reference/domain_modifier_functions/ALIAS.md similarity index 100% rename from documentation/functions/domain/ALIAS.md rename to documentation/02_language_reference/domain_modifier_functions/ALIAS.md diff --git a/documentation/functions/domain/AUTODNSSEC_OFF.md b/documentation/02_language_reference/domain_modifier_functions/AUTODNSSEC_OFF.md similarity index 100% rename from documentation/functions/domain/AUTODNSSEC_OFF.md rename to documentation/02_language_reference/domain_modifier_functions/AUTODNSSEC_OFF.md diff --git a/documentation/functions/domain/AUTODNSSEC_ON.md b/documentation/02_language_reference/domain_modifier_functions/AUTODNSSEC_ON.md similarity index 100% rename from documentation/functions/domain/AUTODNSSEC_ON.md rename to documentation/02_language_reference/domain_modifier_functions/AUTODNSSEC_ON.md diff --git a/documentation/functions/domain/CAA.md b/documentation/02_language_reference/domain_modifier_functions/CAA.md similarity index 79% rename from documentation/functions/domain/CAA.md rename to documentation/02_language_reference/domain_modifier_functions/CAA.md index 8509a1df44..e389608bda 100644 --- a/documentation/functions/domain/CAA.md +++ b/documentation/02_language_reference/domain_modifier_functions/CAA.md @@ -38,4 +38,4 @@ D("example.com", REGISTRAR, DnsProvider("GCLOUD"), ``` {% endcode %} -DNSControl contains a [`CAA_BUILDER`](../record/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. +DNSControl contains a [`CAA_BUILDER`](../record_modifier_functions/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. diff --git a/documentation/functions/domain/CNAME.md b/documentation/02_language_reference/domain_modifier_functions/CNAME.md similarity index 100% rename from documentation/functions/domain/CNAME.md rename to documentation/02_language_reference/domain_modifier_functions/CNAME.md diff --git a/documentation/functions/domain/DS.md b/documentation/02_language_reference/domain_modifier_functions/DS.md similarity index 100% rename from documentation/functions/domain/DS.md rename to documentation/02_language_reference/domain_modifier_functions/DS.md diff --git a/documentation/02_language_reference/domain_modifier_functions/DefaultTTL.md b/documentation/02_language_reference/domain_modifier_functions/DefaultTTL.md new file mode 100644 index 0000000000..95f8b40807 --- /dev/null +++ b/documentation/02_language_reference/domain_modifier_functions/DefaultTTL.md @@ -0,0 +1,26 @@ +--- +name: DefaultTTL +parameters: + - ttl +parameter_types: + ttl: Duration +--- + +DefaultTTL sets the TTL for all subsequent records following it in a domain that do not explicitly set one with [`TTL`](/documentation/02_language_reference/record_modifier_functions/TTL.md). If neither `DefaultTTL` or `TTL` exist for a record, +the record will inherit the DNSControl global internal default of 300 seconds. See also [`DEFAULTS`](/documentation/02_language_reference/top_level_functions/DEFAULTS.md) to override the internal defaults. + +NS records are currently a special case, and do not inherit from `DefaultTTL`. See [`NAMESERVER_TTL`](/documentation/02_language_reference/domain_modifier_functions/NAMESERVER_TTL.md) to set a default TTL for all NS records. + + +{% code title="dnsconfig.js" %} +```javascript +D('example.com', REGISTRAR, DnsProvider('R53'), + DefaultTTL("4h"), + A('@','1.2.3.4'), // uses default + A('foo', '2.3.4.5', TTL(600)) // overrides default +); +``` +{% endcode %} + +The DefaultTTL duration is the same format as [`TTL`](/documentation/02_language_reference/record_modifier_functions/TTL.md), an integer number of seconds +or a string with a unit such as `'4d'`. diff --git a/documentation/functions/domain/DnsProvider.md b/documentation/02_language_reference/domain_modifier_functions/DnsProvider.md similarity index 94% rename from documentation/functions/domain/DnsProvider.md rename to documentation/02_language_reference/domain_modifier_functions/DnsProvider.md index ccefe44b88..2ad8c6553c 100644 --- a/documentation/functions/domain/DnsProvider.md +++ b/documentation/02_language_reference/domain_modifier_functions/DnsProvider.md @@ -9,7 +9,7 @@ parameter_types: --- DnsProvider indicates that the specified provider should be used to manage -records for this domain. The name must match the name used with [NewDnsProvider](../global/NewDnsProvider.md). +records for this domain. The name must match the name used with [NewDnsProvider](../top_level_functions/NewDnsProvider.md). The nsCount parameter determines how the nameservers will be managed from this provider. diff --git a/documentation/functions/domain/FRAME.md b/documentation/02_language_reference/domain_modifier_functions/FRAME.md similarity index 100% rename from documentation/functions/domain/FRAME.md rename to documentation/02_language_reference/domain_modifier_functions/FRAME.md diff --git a/documentation/functions/domain/IGNORE.md b/documentation/02_language_reference/domain_modifier_functions/IGNORE.md similarity index 100% rename from documentation/functions/domain/IGNORE.md rename to documentation/02_language_reference/domain_modifier_functions/IGNORE.md diff --git a/documentation/functions/domain/IGNORE_NAME.md b/documentation/02_language_reference/domain_modifier_functions/IGNORE_NAME.md similarity index 100% rename from documentation/functions/domain/IGNORE_NAME.md rename to documentation/02_language_reference/domain_modifier_functions/IGNORE_NAME.md diff --git a/documentation/functions/domain/IGNORE_TARGET.md b/documentation/02_language_reference/domain_modifier_functions/IGNORE_TARGET.md similarity index 100% rename from documentation/functions/domain/IGNORE_TARGET.md rename to documentation/02_language_reference/domain_modifier_functions/IGNORE_TARGET.md diff --git a/documentation/functions/domain/IMPORT_TRANSFORM.md b/documentation/02_language_reference/domain_modifier_functions/IMPORT_TRANSFORM.md similarity index 100% rename from documentation/functions/domain/IMPORT_TRANSFORM.md rename to documentation/02_language_reference/domain_modifier_functions/IMPORT_TRANSFORM.md diff --git a/documentation/functions/domain/INCLUDE.md b/documentation/02_language_reference/domain_modifier_functions/INCLUDE.md similarity index 100% rename from documentation/functions/domain/INCLUDE.md rename to documentation/02_language_reference/domain_modifier_functions/INCLUDE.md diff --git a/documentation/functions/domain/LOC.md b/documentation/02_language_reference/domain_modifier_functions/LOC.md similarity index 83% rename from documentation/functions/domain/LOC.md rename to documentation/02_language_reference/domain_modifier_functions/LOC.md index d3e54aace0..66ea8f8fc9 100644 --- a/documentation/functions/domain/LOC.md +++ b/documentation/02_language_reference/domain_modifier_functions/LOC.md @@ -68,10 +68,10 @@ the LOC record type will supply defaults where values were absent on DNS import. One must supply the `LOC()` js helper all parameters. If that seems like too much work, see also helper functions: - * [`LOC_BUILDER_DD({})`](../record/LOC_BUILDER_DD.md) - build a `LOC` by supplying only **d**ecimal **d**egrees. - * [`LOC_BUILDER_DMS_STR({})`](../record/LOC_BUILDER_DMS_STR.md) - accepts DMS 33°51′31″S 151°12′51″E - * [`LOC_BUILDER_DMM_STR({})`](../record/LOC_BUILDER_DMM_STR.md) - accepts DMM 25.24°S 153.15°E - * [`LOC_BUILDER_STR({})`](../record/LOC_BUILDER_STR.md) - tries the cooordinate string in all `LOC_BUILDER_DM*_STR()` functions until one works + * [`LOC_BUILDER_DD({})`](../record_modifier_functions/LOC_BUILDER_DD.md) - build a `LOC` by supplying only **d**ecimal **d**egrees. + * [`LOC_BUILDER_DMS_STR({})`](../record_modifier_functions/LOC_BUILDER_DMS_STR.md) - accepts DMS 33°51′31″S 151°12′51″E + * [`LOC_BUILDER_DMM_STR({})`](../record_modifier_functions/LOC_BUILDER_DMM_STR.md) - accepts DMM 25.24°S 153.15°E + * [`LOC_BUILDER_STR({})`](../record_modifier_functions/LOC_BUILDER_STR.md) - tries the cooordinate string in all `LOC_BUILDER_DM*_STR()` functions until one works ## Format ## diff --git a/documentation/functions/domain/MX.md b/documentation/02_language_reference/domain_modifier_functions/MX.md similarity index 100% rename from documentation/functions/domain/MX.md rename to documentation/02_language_reference/domain_modifier_functions/MX.md diff --git a/documentation/functions/domain/NAMESERVER.md b/documentation/02_language_reference/domain_modifier_functions/NAMESERVER.md similarity index 100% rename from documentation/functions/domain/NAMESERVER.md rename to documentation/02_language_reference/domain_modifier_functions/NAMESERVER.md diff --git a/documentation/functions/domain/NAMESERVER_TTL.md b/documentation/02_language_reference/domain_modifier_functions/NAMESERVER_TTL.md similarity index 81% rename from documentation/functions/domain/NAMESERVER_TTL.md rename to documentation/02_language_reference/domain_modifier_functions/NAMESERVER_TTL.md index af336263d6..9cde93409f 100644 --- a/documentation/functions/domain/NAMESERVER_TTL.md +++ b/documentation/02_language_reference/domain_modifier_functions/NAMESERVER_TTL.md @@ -10,7 +10,7 @@ parameter_types: NAMESERVER_TTL sets the TTL on the domain apex NS RRs defined by [`NAMESERVER`](NAMESERVER.md). -The value can be an integer or a string. See [`TTL`](../record/TTL.md) for examples. +The value can be an integer or a string. See [`TTL`](/documentation/02_language_reference/record_modifier_functions/TTL.md) for examples. {% code title="dnsconfig.js" %} ```javascript @@ -36,4 +36,4 @@ D('example.com', REGISTRAR, DnsProvider('xyz'), ``` {% endcode %} -To apply a default TTL to all other record types, see [`DefaultTTL`](../domain/DefaultTTL.md) +To apply a default TTL to all other record types, see [`DefaultTTL`](/documentation/02_language_reference/domain_modifier_functions/DefaultTTL.md) diff --git a/documentation/functions/domain/NAPTR.md b/documentation/02_language_reference/domain_modifier_functions/NAPTR.md similarity index 100% rename from documentation/functions/domain/NAPTR.md rename to documentation/02_language_reference/domain_modifier_functions/NAPTR.md diff --git a/documentation/functions/domain/NO_PURGE.md b/documentation/02_language_reference/domain_modifier_functions/NO_PURGE.md similarity index 100% rename from documentation/functions/domain/NO_PURGE.md rename to documentation/02_language_reference/domain_modifier_functions/NO_PURGE.md diff --git a/documentation/functions/domain/NS.md b/documentation/02_language_reference/domain_modifier_functions/NS.md similarity index 100% rename from documentation/functions/domain/NS.md rename to documentation/02_language_reference/domain_modifier_functions/NS.md diff --git a/documentation/functions/domain/PTR.md b/documentation/02_language_reference/domain_modifier_functions/PTR.md similarity index 97% rename from documentation/functions/domain/PTR.md rename to documentation/02_language_reference/domain_modifier_functions/PTR.md index 2360d8ca04..117c60bc0d 100644 --- a/documentation/functions/domain/PTR.md +++ b/documentation/02_language_reference/domain_modifier_functions/PTR.md @@ -53,7 +53,7 @@ are all equivalent: * `PTR('4.3',` // Assuming the domain is `2.1.in-addr.arpa` All magic is RFC2317-aware. We use the first format listed in the -RFC for both [`REV()`](../global/REV.md) and `PTR()`. The format is +RFC for both [`REV()`](../top_level_functions/REV.md) and `PTR()`. The format is `FIRST/MASK.C.B.A.in-addr.arpa` where `FIRST` is the first IP address of the zone, `MASK` is the netmask of the zone (25-31 inclusive), and A, B, C are the first 3 octets of the IP address. For example diff --git a/documentation/functions/domain/PURGE.md b/documentation/02_language_reference/domain_modifier_functions/PURGE.md similarity index 100% rename from documentation/functions/domain/PURGE.md rename to documentation/02_language_reference/domain_modifier_functions/PURGE.md diff --git a/documentation/functions/domain/SOA.md b/documentation/02_language_reference/domain_modifier_functions/SOA.md similarity index 100% rename from documentation/functions/domain/SOA.md rename to documentation/02_language_reference/domain_modifier_functions/SOA.md diff --git a/documentation/functions/domain/SRV.md b/documentation/02_language_reference/domain_modifier_functions/SRV.md similarity index 100% rename from documentation/functions/domain/SRV.md rename to documentation/02_language_reference/domain_modifier_functions/SRV.md diff --git a/documentation/functions/domain/SSHFP.md b/documentation/02_language_reference/domain_modifier_functions/SSHFP.md similarity index 100% rename from documentation/functions/domain/SSHFP.md rename to documentation/02_language_reference/domain_modifier_functions/SSHFP.md diff --git a/documentation/functions/domain/TLSA.md b/documentation/02_language_reference/domain_modifier_functions/TLSA.md similarity index 100% rename from documentation/functions/domain/TLSA.md rename to documentation/02_language_reference/domain_modifier_functions/TLSA.md diff --git a/documentation/functions/domain/TXT.md b/documentation/02_language_reference/domain_modifier_functions/TXT.md similarity index 98% rename from documentation/functions/domain/TXT.md rename to documentation/02_language_reference/domain_modifier_functions/TXT.md index 183948f868..8b4c29d229 100644 --- a/documentation/functions/domain/TXT.md +++ b/documentation/02_language_reference/domain_modifier_functions/TXT.md @@ -87,7 +87,7 @@ double quotes, back-ticks, or other chars. #### How can you tell if a provider will support a particular `TXT()` record? -Include the `TXT()` record in a [`D()`](../global/D.md) as usual, along +Include the `TXT()` record in a [`D()`](../top_level_functions/D.md) as usual, along with the `DnsProvider()` for that provider. Run `dnscontrol check` to see if any errors are produced. The check command does not talk to the provider's API, thus permitting you to do this without having an diff --git a/documentation/functions/domain/URL.md b/documentation/02_language_reference/domain_modifier_functions/URL.md similarity index 100% rename from documentation/functions/domain/URL.md rename to documentation/02_language_reference/domain_modifier_functions/URL.md diff --git a/documentation/functions/domain/URL301.md b/documentation/02_language_reference/domain_modifier_functions/URL301.md similarity index 100% rename from documentation/functions/domain/URL301.md rename to documentation/02_language_reference/domain_modifier_functions/URL301.md diff --git a/documentation/functions/domain/CLOUDNS_WR.md b/documentation/02_language_reference/domain_modifier_functions/service_provider_specific/ClouDNS/CLOUDNS_WR.md similarity index 100% rename from documentation/functions/domain/CLOUDNS_WR.md rename to documentation/02_language_reference/domain_modifier_functions/service_provider_specific/ClouDNS/CLOUDNS_WR.md diff --git a/documentation/functions/domain/NS1_URLFWD.md b/documentation/02_language_reference/domain_modifier_functions/service_provider_specific/NS1/NS1_URLFWD.md similarity index 100% rename from documentation/functions/domain/NS1_URLFWD.md rename to documentation/02_language_reference/domain_modifier_functions/service_provider_specific/NS1/NS1_URLFWD.md diff --git a/documentation/functions/domain/AKAMAICDN.md b/documentation/02_language_reference/domain_modifier_functions/service_provider_specific/akamai_edge_dns/AKAMAICDN.md similarity index 100% rename from documentation/functions/domain/AKAMAICDN.md rename to documentation/02_language_reference/domain_modifier_functions/service_provider_specific/akamai_edge_dns/AKAMAICDN.md diff --git a/documentation/functions/domain/R53_ALIAS.md b/documentation/02_language_reference/domain_modifier_functions/service_provider_specific/amazon_route_53/R53_ALIAS.md similarity index 96% rename from documentation/functions/domain/R53_ALIAS.md rename to documentation/02_language_reference/domain_modifier_functions/service_provider_specific/amazon_route_53/R53_ALIAS.md index 28f628c582..b00606b633 100644 --- a/documentation/functions/domain/R53_ALIAS.md +++ b/documentation/02_language_reference/domain_modifier_functions/service_provider_specific/amazon_route_53/R53_ALIAS.md @@ -13,7 +13,7 @@ provider: ROUTE53 `R53_ALIAS` is a Route53 specific virtual record type that points a record at either another record or an AWS entity (like a Cloudfront distribution, an ELB, etc...). It is analogous to a `CNAME`, but is usually resolved at request-time and served as an `A` record. Unlike `CNAME` records, `ALIAS` records can be used at the zone apex (`@`) -Unlike the regular [`ALIAS`](ALIAS.md) directive, `R53_ALIAS` is only supported on Route53. Attempting to use `R53_ALIAS` on another provider than Route53 will result in an error. +Unlike the regular [`ALIAS`](../../ALIAS.md) directive, `R53_ALIAS` is only supported on Route53. Attempting to use `R53_ALIAS` on another provider than Route53 will result in an error. The name should be the relative label for the domain. diff --git a/documentation/functions/domain/AZURE_ALIAS.md b/documentation/02_language_reference/domain_modifier_functions/service_provider_specific/azure_dns/AZURE_ALIAS.md similarity index 100% rename from documentation/functions/domain/AZURE_ALIAS.md rename to documentation/02_language_reference/domain_modifier_functions/service_provider_specific/azure_dns/AZURE_ALIAS.md diff --git a/documentation/functions/domain/CF_REDIRECT.md b/documentation/02_language_reference/domain_modifier_functions/service_provider_specific/cloudflare_dns/CF_REDIRECT.md similarity index 100% rename from documentation/functions/domain/CF_REDIRECT.md rename to documentation/02_language_reference/domain_modifier_functions/service_provider_specific/cloudflare_dns/CF_REDIRECT.md diff --git a/documentation/functions/domain/CF_TEMP_REDIRECT.md b/documentation/02_language_reference/domain_modifier_functions/service_provider_specific/cloudflare_dns/CF_TEMP_REDIRECT.md similarity index 100% rename from documentation/functions/domain/CF_TEMP_REDIRECT.md rename to documentation/02_language_reference/domain_modifier_functions/service_provider_specific/cloudflare_dns/CF_TEMP_REDIRECT.md diff --git a/documentation/functions/domain/CF_WORKER_ROUTE.md b/documentation/02_language_reference/domain_modifier_functions/service_provider_specific/cloudflare_dns/CF_WORKER_ROUTE.md similarity index 100% rename from documentation/functions/domain/CF_WORKER_ROUTE.md rename to documentation/02_language_reference/domain_modifier_functions/service_provider_specific/cloudflare_dns/CF_WORKER_ROUTE.md diff --git a/documentation/02_language_reference/domain_modifier_functions/service_provider_specific/ignore-me.md b/documentation/02_language_reference/domain_modifier_functions/service_provider_specific/ignore-me.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/documentation/js.md b/documentation/02_language_reference/js.md similarity index 100% rename from documentation/js.md rename to documentation/02_language_reference/js.md diff --git a/documentation/functions/record/CAA_BUILDER.md b/documentation/02_language_reference/record_modifier_functions/CAA_BUILDER.md similarity index 93% rename from documentation/functions/record/CAA_BUILDER.md rename to documentation/02_language_reference/record_modifier_functions/CAA_BUILDER.md index 04bc365c39..fe1f23c82e 100644 --- a/documentation/functions/record/CAA_BUILDER.md +++ b/documentation/02_language_reference/record_modifier_functions/CAA_BUILDER.md @@ -16,7 +16,7 @@ parameter_types: --- DNSControl contains a `CAA_BUILDER` which can be used to simply create -[`CAA()`](../domain/CAA.md) records for your domains. Instead of creating each [`CAA()`](../domain/CAA.md) record +`CAA` 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. diff --git a/documentation/functions/record/DMARC_BUILDER.md b/documentation/02_language_reference/record_modifier_functions/DMARC_BUILDER.md similarity index 100% rename from documentation/functions/record/DMARC_BUILDER.md rename to documentation/02_language_reference/record_modifier_functions/DMARC_BUILDER.md diff --git a/documentation/02_language_reference/record_modifier_functions/LOC_BUILDER_DD.md b/documentation/02_language_reference/record_modifier_functions/LOC_BUILDER_DD.md new file mode 100644 index 0000000000..aca1f08169 --- /dev/null +++ b/documentation/02_language_reference/record_modifier_functions/LOC_BUILDER_DD.md @@ -0,0 +1,74 @@ +--- +name: LOC_BUILDER_DD +parameters: + - label + - x + - y + - alt + - ttl +parameter_types: + label: string + x: float32 + y: float32 + alt: float32 + ttl: int +--- + +`LOC_BUILDER_DD({})` actually takes an object with the following properties: + + - label (optional, defaults to `@`) + - x + - y + - alt + - ttl (optional) + +A helper to build [`LOC`](/documentation/02_language_reference/domain_modifier_functions/LOC.md) records. Supply four parameters instead of 12. + +Internally assumes some defaults for [`LOC`](/documentation/02_language_reference/domain_modifier_functions/LOC.md) records. + + +The cartesian coordinates are decimal degrees, like you typically find in e.g. Google Maps. + +Examples. + +Big Ben: +`51.50084265331501, -0.12462541415599787` + +The White House: +`38.89775977858357, -77.03655125982903` + + +{% code title="dnsconfig.js" %} +```javascript +D("example.com","none" + , LOC_BUILDER_DD({ + label: "big-ben", + x: 51.50084265331501, + y: -0.12462541415599787, + alt: 6, + }) + , LOC_BUILDER_DD({ + label: "white-house", + x: 38.89775977858357, + y: -77.03655125982903, + alt: 19, + }) + , LOC_BUILDER_DD({ + label: "white-house-ttl", + x: 38.89775977858357, + y: -77.03655125982903, + alt: 19, + ttl: "5m", + }) +); + +``` +{% endcode %} + + +Part of the series: + * [`LOC()`](/documentation/02_language_reference/domain_modifier_functions/LOC.md) - build a `LOC` by supplying all 12 parameters + * [`LOC_BUILDER_DD({})`](/documentation/02_language_reference/record_modifier_functions/LOC_BUILDER_DD.md) - accepts cartesian x, y + * [`LOC_BUILDER_DMS_STR({})`](/documentation/02_language_reference/record_modifier_functions/LOC_BUILDER_DMS_STR.md) - accepts DMS 33°51′31″S 151°12′51″E + * [`LOC_BUILDER_DMM_STR({})`](/documentation/02_language_reference/record_modifier_functions/LOC_BUILDER_DMM_STR.md) - accepts DMM 25.24°S 153.15°E + * [`LOC_BUILDER_STR({})`](/documentation/02_language_reference/record_modifier_functions/LOC_BUILDER_STR.md) - tries the cooordinate string in all `LOC_BUILDER_DM*_STR()` functions until one works diff --git a/documentation/02_language_reference/record_modifier_functions/LOC_BUILDER_DMM_STR.md b/documentation/02_language_reference/record_modifier_functions/LOC_BUILDER_DMM_STR.md new file mode 100644 index 0000000000..e865906d56 --- /dev/null +++ b/documentation/02_language_reference/record_modifier_functions/LOC_BUILDER_DMM_STR.md @@ -0,0 +1,54 @@ +--- +name: LOC_BUILDER_DMM_STR +parameters: + - label + - str + - alt + - ttl +parameter_types: + label: string + str: string + alt: float32 + ttl: int +--- + +`LOC_BUILDER_DMM({})` actually takes an object with the following properties: + + - label (optional, defaults to `@`) + - str + - alt + - ttl (optional) + +A helper to build [`LOC`](../domain_modifier_functions/LOC.md) records. Supply three parameters instead of 12. + +Internally assumes some defaults for [`LOC`](../domain_modifier_functions/LOC.md) records. + + +Accepts a string with decimal minutes (DMM) coordinates in the form: 25.24°S 153.15°E + +Note that the following are acceptable forms (symbols differ): +* `25.24°S 153.15°E` +* `25.24 S 153.15 E` +* `25.24° S 153.15° E` +* `25.24S 153.15E` + +{% code title="dnsconfig.js" %} +```javascript +D("example.com","none" + LOC_BUILDER_STR({ + label: "tasmania", + str: '42°S 147°E', + alt: 3, + }) +); + +``` +{% endcode %} + + +Part of the series: + * [`LOC()`](../domain_modifier_functions/LOC.md) - build a `LOC` by supplying all 12 parameters + * [`LOC_BUILDER_DD({})`](../record_modifier_functions/LOC_BUILDER_DD.md) - accepts cartesian x, y + * [`LOC_BUILDER_DMS_STR({})`](../record_modifier_functions/LOC_BUILDER_DMS_STR.md) - accepts DMS 33°51′31″S 151°12′51″E + * [`LOC_BUILDER_DMM_STR({})`](../record_modifier_functions/LOC_BUILDER_DMM_STR.md) - accepts DMM 25.24°S 153.15°E + * [`LOC_BUILDER_STR({})`](../record_modifier_functions/LOC_BUILDER_STR.md) - tries the cooordinate string in all `LOC_BUILDER_DM*_STR()` functions until one works diff --git a/documentation/functions/record/LOC_BUILDER_DMS_STR.md b/documentation/02_language_reference/record_modifier_functions/LOC_BUILDER_DMS_STR.md similarity index 51% rename from documentation/functions/record/LOC_BUILDER_DMS_STR.md rename to documentation/02_language_reference/record_modifier_functions/LOC_BUILDER_DMS_STR.md index 8e75924545..8806456781 100644 --- a/documentation/functions/record/LOC_BUILDER_DMS_STR.md +++ b/documentation/02_language_reference/record_modifier_functions/LOC_BUILDER_DMS_STR.md @@ -19,9 +19,9 @@ parameter_types: - alt - ttl (optional) -A helper to build [`LOC`](../domain/LOC.md) records. Supply three parameters instead of 12. +A helper to build [`LOC`](../domain_modifier_functions/LOC.md) records. Supply three parameters instead of 12. -Internally assumes some defaults for [`LOC`](../domain/LOC.md) records. +Internally assumes some defaults for [`LOC`](../domain_modifier_functions/LOC.md) records. Accepts a string with degrees, minutes, and seconds (DMS) coordinates in the form: 41°24'12.2"N 2°10'26.5"E @@ -48,8 +48,8 @@ D("example.com","none" Part of the series: - * [`LOC()`](../domain/LOC.md) - build a `LOC` by supplying all 12 parameters - * [`LOC_BUILDER_DD({})`](../record/LOC_BUILDER_DD.md) - accepts cartesian x, y - * [`LOC_BUILDER_DMS_STR({})`](../record/LOC_BUILDER_DMS_STR.md) - accepts DMS 33°51′31″S 151°12′51″E - * [`LOC_BUILDER_DMM_STR({})`](../record/LOC_BUILDER_DMM_STR.md) - accepts DMM 25.24°S 153.15°E - * [`LOC_BUILDER_STR({})`](../record/LOC_BUILDER_STR.md) - tries the cooordinate string in all `LOC_BUILDER_DM*_STR()` functions until one works + * [`LOC()`](../domain_modifier_functions/LOC.md) - build a `LOC` by supplying all 12 parameters + * [`LOC_BUILDER_DD({})`](../record_modifier_functions/LOC_BUILDER_DD.md) - accepts cartesian x, y + * [`LOC_BUILDER_DMS_STR({})`](../record_modifier_functions/LOC_BUILDER_DMS_STR.md) - accepts DMS 33°51′31″S 151°12′51″E + * [`LOC_BUILDER_DMM_STR({})`](../record_modifier_functions/LOC_BUILDER_DMM_STR.md) - accepts DMM 25.24°S 153.15°E + * [`LOC_BUILDER_STR({})`](../record_modifier_functions/LOC_BUILDER_STR.md) - tries the cooordinate string in all `LOC_BUILDER_DM*_STR()` functions until one works diff --git a/documentation/02_language_reference/record_modifier_functions/LOC_BUILDER_STR.md b/documentation/02_language_reference/record_modifier_functions/LOC_BUILDER_STR.md new file mode 100644 index 0000000000..a84106e95f --- /dev/null +++ b/documentation/02_language_reference/record_modifier_functions/LOC_BUILDER_STR.md @@ -0,0 +1,61 @@ +--- +name: LOC_BUILDER_STR +parameters: + - label + - str + - alt + - ttl +parameter_types: + label: string + str: string + alt: float32 + ttl: int +--- + +`LOC_BUILDER_STR({})` actually takes an object with the following: properties. + + - label (optional, defaults to `@`) + - str + - alt + - ttl (optional) + +A helper to build [`LOC`](/documentation/02_language_reference/domain_modifier_functions/LOC.md) records. Supply three parameters instead of 12. + +Internally assumes some defaults for [`LOC`](/documentation/02_language_reference/domain_modifier_functions/LOC.md) records. + + +Accepts a string and tries all `LOC_BUILDER_DM*_STR({})` methods: + * [`LOC_BUILDER_DMS_STR({})`](/documentation/02_language_reference/record_modifier_functions/LOC_BUILDER_DMS_STR.md) - accepts DMS 33°51′31″S 151°12′51″E + * [`LOC_BUILDER_DMM_STR({})`](/documentation/02_language_reference/record_modifier_functions/LOC_BUILDER_DMM_STR.md) - accepts DMM 25.24°S 153.15°E + + +{% code title="dnsconfig.js" %} +```javascript +D("example.com","none" + , LOC_BUILDER_STR({ + label: "old-faithful", + str: '44.46046°N 110.82815°W', + alt: 2240, + }) + , LOC_BUILDER_STR({ + label: "ribblehead-viaduct", + str: '54.210436°N 2.370231°W', + alt: 300, + }) + , LOC_BUILDER_STR({ + label: "guinness-brewery", + str: '53°20′40″N 6°17′20″W', + alt: 300, + }) +); + +``` +{% endcode %} + + +Part of the series: + * [`LOC()`](/documentation/02_language_reference/domain_modifier_functions/LOC.md) - build a `LOC` by supplying all 12 parameters + * [`LOC_BUILDER_DD({})`](/documentation/02_language_reference/record_modifier_functions/LOC_BUILDER_DD.md) - accepts cartesian x, y + * [`LOC_BUILDER_DMS_STR({})`](/documentation/02_language_reference/record_modifier_functions/LOC_BUILDER_DMS_STR.md) - accepts DMS 33°51′31″S 151°12′51″E + * [`LOC_BUILDER_DMM_STR({})`](/documentation/02_language_reference/record_modifier_functions/LOC_BUILDER_DMM_STR.md) - accepts DMM 25.24°S 153.15°E + * [`LOC_BUILDER_STR({})`](/documentation/02_language_reference/record_modifier_functions/LOC_BUILDER_STR.md) - tries the cooordinate string in all `LOC_BUILDER_DM*_STR()` functions until one works diff --git a/documentation/functions/record/SPF_BUILDER.md b/documentation/02_language_reference/record_modifier_functions/SPF_BUILDER.md similarity index 100% rename from documentation/functions/record/SPF_BUILDER.md rename to documentation/02_language_reference/record_modifier_functions/SPF_BUILDER.md diff --git a/documentation/functions/record/TTL.md b/documentation/02_language_reference/record_modifier_functions/TTL.md similarity index 89% rename from documentation/functions/record/TTL.md rename to documentation/02_language_reference/record_modifier_functions/TTL.md index 490e9d2eb3..51e9186440 100644 --- a/documentation/functions/record/TTL.md +++ b/documentation/02_language_reference/record_modifier_functions/TTL.md @@ -7,7 +7,7 @@ parameter_types: --- TTL sets the TTL for a single record only. This will take precedence -over the domain's [DefaultTTL](../domain/DefaultTTL.md) if supplied. +over the domain's [DefaultTTL](/documentation/02_language_reference/domain_modifier_functions/DefaultTTL.md) if supplied. The value can be: diff --git a/documentation/functions/record/R53_ZONE.md b/documentation/02_language_reference/record_modifier_functions/service_provider_specific/amazon_route_53/R53_ZONE.md similarity index 72% rename from documentation/functions/record/R53_ZONE.md rename to documentation/02_language_reference/record_modifier_functions/service_provider_specific/amazon_route_53/R53_ZONE.md index 02fb9dd9b7..0347007591 100644 --- a/documentation/functions/record/R53_ZONE.md +++ b/documentation/02_language_reference/record_modifier_functions/service_provider_specific/amazon_route_53/R53_ZONE.md @@ -12,4 +12,4 @@ R53_ZONE lets you specify the AWS Zone ID for an entire domain (D()) or a specif When used with D(), it sets the zone id of the domain. This can be used to differentiate between split horizon domains in public and private zones. -When used with R53_ALIAS() it sets the required Route53 hosted zone id in a R53_ALIAS record. See [R53_ALIAS's documentation](../domain/R53_ALIAS.md) for details. +When used with R53_ALIAS() it sets the required Route53 hosted zone id in a R53_ALIAS record. See [R53_ALIAS's documentation](02_language_reference/domain_modifier_functions/service_provider_specific/amazon_route_53/R53_ALIAS.md) for details. diff --git a/documentation/02_language_reference/record_modifier_functions/service_provider_specific/ignore-me.md b/documentation/02_language_reference/record_modifier_functions/service_provider_specific/ignore-me.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/documentation/functions/global/D.md b/documentation/02_language_reference/top_level_functions/D.md similarity index 94% rename from documentation/functions/global/D.md rename to documentation/02_language_reference/top_level_functions/D.md index 181ecc46ab..913e5f5f33 100644 --- a/documentation/functions/global/D.md +++ b/documentation/02_language_reference/top_level_functions/D.md @@ -12,7 +12,7 @@ parameter_types: `D` adds a new Domain for DNSControl to manage. The first two arguments are required: the domain name (fully qualified `example.com` without a trailing dot), and the name of the registrar (as previously declared with [NewRegistrar](NewRegistrar.md)). Any number of additional arguments may be included to add DNS Providers with [DNSProvider](NewDnsProvider.md), -add records with [A](../domain/A.md), [CNAME](../domain/CNAME.md), and so forth, or add metadata. +add records with [A](/documentation/02_language_reference/domain_modifier_functions/A.md), [CNAME](/documentation/02_language_reference/domain_modifier_functions/CNAME.md), and so forth, or add metadata. Modifier arguments are processed according to type as follows: diff --git a/documentation/functions/global/DEFAULTS.md b/documentation/02_language_reference/top_level_functions/DEFAULTS.md similarity index 88% rename from documentation/functions/global/DEFAULTS.md rename to documentation/02_language_reference/top_level_functions/DEFAULTS.md index 7a81ba54e5..28d073167f 100644 --- a/documentation/functions/global/DEFAULTS.md +++ b/documentation/02_language_reference/top_level_functions/DEFAULTS.md @@ -11,7 +11,7 @@ arguments passed as if they were the first modifiers in the argument list. ## Example -We want to create backup zone files for all domains, but not actually register them. Also create a [`DefaultTTL`](../domain/DefaultTTL.md). +We want to create backup zone files for all domains, but not actually register them. Also create a [`DefaultTTL`](/documentation/02_language_reference/domain_modifier_functions/DefaultTTL.md). The domain `example.com` will have the defaults set. {% code title="dnsconfig.js" %} diff --git a/documentation/functions/global/DOMAIN_ELSEWHERE.md b/documentation/02_language_reference/top_level_functions/DOMAIN_ELSEWHERE.md similarity index 89% rename from documentation/functions/global/DOMAIN_ELSEWHERE.md rename to documentation/02_language_reference/top_level_functions/DOMAIN_ELSEWHERE.md index bfcb367f93..f3adfb1966 100644 --- a/documentation/functions/global/DOMAIN_ELSEWHERE.md +++ b/documentation/02_language_reference/top_level_functions/DOMAIN_ELSEWHERE.md @@ -40,6 +40,6 @@ D("example.com", REG_NAMEDOTCOM, {% endcode %} {% hint style="info" %} -**NOTE**: The [`NO_PURGE`](../domain/NO_PURGE.md) is used out of abundance of caution but since no +**NOTE**: The [`NO_PURGE`](/documentation/02_language_reference/domain_modifier_functions/NO_PURGE.md) is used out of abundance of caution but since no `DnsProvider()` statements exist, no updates would be performed. {% endhint %} diff --git a/documentation/functions/global/DOMAIN_ELSEWHERE_AUTO.md b/documentation/02_language_reference/top_level_functions/DOMAIN_ELSEWHERE_AUTO.md similarity index 89% rename from documentation/functions/global/DOMAIN_ELSEWHERE_AUTO.md rename to documentation/02_language_reference/top_level_functions/DOMAIN_ELSEWHERE_AUTO.md index 3c11a7756b..48134c922c 100644 --- a/documentation/functions/global/DOMAIN_ELSEWHERE_AUTO.md +++ b/documentation/02_language_reference/top_level_functions/DOMAIN_ELSEWHERE_AUTO.md @@ -44,5 +44,5 @@ D("example.com", REG_NAMEDOTCOM, {% endcode %} {% hint style="info" %} -**NOTE**: The [`NO_PURGE`](../domain/NO_PURGE.md) is used to prevent DNSControl from changing the records. +**NOTE**: The [`NO_PURGE`](/documentation/02_language_reference/domain_modifier_functions/NO_PURGE.md) is used to prevent DNSControl from changing the records. {% endhint %} diff --git a/documentation/functions/global/D_EXTEND.md b/documentation/02_language_reference/top_level_functions/D_EXTEND.md similarity index 91% rename from documentation/functions/global/D_EXTEND.md rename to documentation/02_language_reference/top_level_functions/D_EXTEND.md index 9b0d9848d6..ea67a8afdc 100644 --- a/documentation/functions/global/D_EXTEND.md +++ b/documentation/02_language_reference/top_level_functions/D_EXTEND.md @@ -29,7 +29,7 @@ defined as separate domains via separate [`D()`](D.md) statements, then not `domain.tld`. Some operators only act on an apex domain (e.g. -[`CF_REDIRECT`](../domain/CF_REDIRECT.md) and [`CF_TEMP_REDIRECT`](../domain/CF_TEMP_REDIRECT.md)). Using them +[`CF_REDIRECT`](/documentation/02_language_reference/domain_modifier_functions/service_provider_specific/cloudflare_dns/CF_REDIRECT.md) and [`CF_TEMP_REDIRECT`](/documentation/02_language_reference/domain_modifier_functions/service_provider_specific/cloudflare_dns/CF_TEMP_REDIRECT.md)). Using them in a `D_EXTEND` subdomain may not be what you expect. {% code title="dnsconfig.js" %} diff --git a/documentation/functions/global/FETCH.md b/documentation/02_language_reference/top_level_functions/FETCH.md similarity index 100% rename from documentation/functions/global/FETCH.md rename to documentation/02_language_reference/top_level_functions/FETCH.md diff --git a/documentation/functions/global/IP.md b/documentation/02_language_reference/top_level_functions/IP.md similarity index 100% rename from documentation/functions/global/IP.md rename to documentation/02_language_reference/top_level_functions/IP.md diff --git a/documentation/functions/global/NewDnsProvider.md b/documentation/02_language_reference/top_level_functions/NewDnsProvider.md similarity index 100% rename from documentation/functions/global/NewDnsProvider.md rename to documentation/02_language_reference/top_level_functions/NewDnsProvider.md diff --git a/documentation/functions/global/NewRegistrar.md b/documentation/02_language_reference/top_level_functions/NewRegistrar.md similarity index 100% rename from documentation/functions/global/NewRegistrar.md rename to documentation/02_language_reference/top_level_functions/NewRegistrar.md diff --git a/documentation/functions/global/PANIC.md b/documentation/02_language_reference/top_level_functions/PANIC.md similarity index 100% rename from documentation/functions/global/PANIC.md rename to documentation/02_language_reference/top_level_functions/PANIC.md diff --git a/documentation/functions/global/REV.md b/documentation/02_language_reference/top_level_functions/REV.md similarity index 93% rename from documentation/functions/global/REV.md rename to documentation/02_language_reference/top_level_functions/REV.md index 9aba56cd6b..f1ab8e2958 100644 --- a/documentation/functions/global/REV.md +++ b/documentation/02_language_reference/top_level_functions/REV.md @@ -51,6 +51,6 @@ D(REV('2001:db8:302::/48'), REGISTRAR, DnsProvider(BIND), ``` {% endcode %} -In the future we plan on adding a flag to [`A()`](../domain/A.md)which will insert +In the future we plan on adding a flag to [`A()`](/documentation/02_language_reference/domain_modifier_functions/A.md)which will insert the correct PTR() record in the appropriate `D(REV())` domain (i.e. `.arpa` domain) has been defined. diff --git a/documentation/functions/global/getConfiguredDomains.md b/documentation/02_language_reference/top_level_functions/getConfiguredDomains.md similarity index 100% rename from documentation/functions/global/getConfiguredDomains.md rename to documentation/02_language_reference/top_level_functions/getConfiguredDomains.md diff --git a/documentation/functions/global/require.md b/documentation/02_language_reference/top_level_functions/require.md similarity index 100% rename from documentation/functions/global/require.md rename to documentation/02_language_reference/top_level_functions/require.md diff --git a/documentation/functions/global/require_glob.md b/documentation/02_language_reference/top_level_functions/require_glob.md similarity index 100% rename from documentation/functions/global/require_glob.md rename to documentation/02_language_reference/top_level_functions/require_glob.md diff --git a/documentation/SUMMARY.md b/documentation/SUMMARY.md index 1966d77435..74351d1349 100644 --- a/documentation/SUMMARY.md +++ b/documentation/SUMMARY.md @@ -2,6 +2,8 @@ * [Introduction to DNSControl](index.md) + + ## Getting Started * [Overview](getting-started.md) @@ -168,4 +170,5 @@ * [How to build and ship a release](release-engineering.md) * [Changelog v3.16.0](v316.md) + * [GitHub releases](https://github.com/StackExchange/dnscontrol/releases/latest) diff --git a/documentation/ci-cd-gitlab.md b/documentation/advanced_features/CI-CD_example_for_GitLab.md similarity index 100% rename from documentation/ci-cd-gitlab.md rename to documentation/advanced_features/CI-CD_example_for_GitLab.md diff --git a/documentation/cli-variables.md b/documentation/advanced_features/CLI_variables.md similarity index 100% rename from documentation/cli-variables.md rename to documentation/advanced_features/CLI_variables.md diff --git a/documentation/code-tricks.md b/documentation/advanced_features/code_tricks.md similarity index 100% rename from documentation/code-tricks.md rename to documentation/advanced_features/code_tricks.md diff --git a/documentation/nameservers.md b/documentation/advanced_features/nameservers.md similarity index 100% rename from documentation/nameservers.md rename to documentation/advanced_features/nameservers.md diff --git a/documentation/notifications.md b/documentation/advanced_features/notifications.md similarity index 100% rename from documentation/notifications.md rename to documentation/advanced_features/notifications.md diff --git a/documentation/check-creds.md b/documentation/commands/check-creds.md similarity index 100% rename from documentation/check-creds.md rename to documentation/commands/check-creds.md diff --git a/documentation/creds-json.md b/documentation/commands/creds-json.md similarity index 100% rename from documentation/creds-json.md rename to documentation/commands/creds-json.md diff --git a/documentation/get-certs.md b/documentation/commands/get-certs.md similarity index 100% rename from documentation/get-certs.md rename to documentation/commands/get-certs.md diff --git a/documentation/get-zones.md b/documentation/commands/get-zones.md similarity index 100% rename from documentation/get-zones.md rename to documentation/commands/get-zones.md diff --git a/documentation/opinions.md b/documentation/developer_info/DNSControl_is_an_opinionated_system.md similarity index 100% rename from documentation/opinions.md rename to documentation/developer_info/DNSControl_is_an_opinionated_system.md diff --git a/documentation/alias.md b/documentation/developer_info/alias_records.md similarity index 100% rename from documentation/alias.md rename to documentation/developer_info/alias_records.md diff --git a/documentation/byo-secrets.md b/documentation/developer_info/bring-your-own-secrets.md similarity index 100% rename from documentation/byo-secrets.md rename to documentation/developer_info/bring-your-own-secrets.md diff --git a/documentation/bug-triage.md b/documentation/developer_info/bug_triage_process.md similarity index 100% rename from documentation/bug-triage.md rename to documentation/developer_info/bug_triage_process.md diff --git a/documentation/adding-new-rtypes.md b/documentation/developer_info/creating_new_rtypes.md similarity index 89% rename from documentation/adding-new-rtypes.md rename to documentation/developer_info/creating_new_rtypes.md index 4f68e9452a..cbfea678bf 100644 --- a/documentation/adding-new-rtypes.md +++ b/documentation/developer_info/creating_new_rtypes.md @@ -153,7 +153,7 @@ example we removed `providers.CanUseCAA` from the Add a function to `pkg/js/helpers.js` for the new record type. This is the JavaScript file that defines `dnsconfig.js`'s functions like -[`A()`](functions/domain/A.md) and [`MX()`](functions/domain/MX.md). Look at the definition of `A`, `MX` and `CAA` for good +[`A()`](/documentation/02_language_reference/domain_modifier_functions/A.md) and [`MX()`](/documentation/02_language_reference/domain_modifier_functions/MX.md). Look at the definition of `A`, `MX` and `CAA` for good examples to use as a base. Please add the function alphabetically with the others. Also, please run @@ -291,7 +291,8 @@ tests, please ask! ## Step 8: Write documentation -Add a new Markdown file to `documentation/functions/domain`. Copy an existing file (`CNAME.md` is a good example). The section between the lines of `---` is called the front matter and it has the following keys: + +Add the new file `FOO.md` to its respective location in the documentation folder tree, and the next run of `go generate ./...` will automatically update the table of contents [`documentation/SUMMARY.md`](SUMMARY.md). You can copy an existing file (`CNAME.md` is a good example) as a starting point. The section between the lines of `---` is called the front matter and it has the following keys: - `name`: The name of the record. This should match the file name and the name of the record in `helpers.js`. - `parameters`: A list of parameter names, in order. Feel free to use spaces in the name if necessary. Your last parameter should be `modifiers...` to allow arbitrary modifiers like `TTL` to be applied to your record. @@ -299,31 +300,4 @@ Add a new Markdown file to `documentation/functions/domain`. Copy an existing fi The rest of the file is the documentation. You can use Markdown syntax to format the text. -Add the new file `FOO.md` to the documentation table of contents [`documentation/SUMMARY.md`](SUMMARY.md#domain-modifiers), and/or to the [`Service Provider specific`](SUMMARY.md#service-provider-specific) section if you made a record specific to a provider, and to the [`Record Modifiers`](SUMMARY.md#record-modifiers) section if you created any `*_BUILDER` or `*_HELPER` or similar functions for the new record type: - -{% code title="documentation/SUMMARY.md" %} -```diff -... -* Domain Modifiers -... - * [DnsProvider](functions/domain/DnsProvider.md) -+ * [FOO](functions/domain/FOO.md) - * [FRAME](functions/domain/FRAME.md) -... - * Service Provider specific -... - * ClouDNS - * [CLOUDNS_WR](functions/domain/CLOUDNS_WR.md) -+ * ASDF -+ * [NINJA_RECORD](function/domain/FOO_NINJA.md) - * NS1 - * [NS1_URLFWD](functions/domain/NS1_URLFWD.md) -... -* Record Modifiers -... - * [DMARC_BUILDER](functions/record/DMARC_BUILDER.md) -+ * [FOO_HELPER](functions/record/FOO_HELPER.md) - * [SPF_BUILDER](functions/record/SPF_BUILDER.md) -... -``` -{% endcode %} +Note that any links in .md files should use an 'assolute' form. E.g. Links to `FOO.md` in the folder `documentation/02_language_reference/domain_modifier_functions` should be (note leading `/`) `/documentation/02_language_reference/domain_modifier_functions/FOO.md`. diff --git a/documentation/debugging-with-dlv.md b/documentation/developer_info/debugging_with_dlv.md similarity index 100% rename from documentation/debugging-with-dlv.md rename to documentation/developer_info/debugging_with_dlv.md diff --git a/documentation/integration-tests.md b/documentation/developer_info/integration_tests.md similarity index 100% rename from documentation/integration-tests.md rename to documentation/developer_info/integration_tests.md diff --git a/documentation/testing-txt-records.md b/documentation/developer_info/txt_record_testing.md similarity index 100% rename from documentation/testing-txt-records.md rename to documentation/developer_info/txt_record_testing.md diff --git a/documentation/unittests.md b/documentation/developer_info/unit_testing_dns_data.md similarity index 100% rename from documentation/unittests.md rename to documentation/developer_info/unit_testing_dns_data.md diff --git a/documentation/writing-providers.md b/documentation/developer_info/writing_new_providers.md similarity index 100% rename from documentation/writing-providers.md rename to documentation/developer_info/writing_new_providers.md diff --git a/documentation/functions/domain/DefaultTTL.md b/documentation/functions/domain/DefaultTTL.md deleted file mode 100644 index 1b45326b78..0000000000 --- a/documentation/functions/domain/DefaultTTL.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -name: DefaultTTL -parameters: - - ttl -parameter_types: - ttl: Duration ---- - -DefaultTTL sets the TTL for all subsequent records following it in a domain that do not explicitly set one with [`TTL`](../record/TTL.md). If neither `DefaultTTL` or `TTL` exist for a record, -the record will inherit the DNSControl global internal default of 300 seconds. See also [`DEFAULTS`](../global/DEFAULTS.md) to override the internal defaults. - -NS records are currently a special case, and do not inherit from `DefaultTTL`. See [`NAMESERVER_TTL`](../domain/NAMESERVER_TTL.md) to set a default TTL for all NS records. - - -{% code title="dnsconfig.js" %} -```javascript -D('example.com', REGISTRAR, DnsProvider('R53'), - DefaultTTL("4h"), - A('@','1.2.3.4'), // uses default - A('foo', '2.3.4.5', TTL(600)) // overrides default -); -``` -{% endcode %} - -The DefaultTTL duration is the same format as [`TTL`](../record/TTL.md), an integer number of seconds -or a string with a unit such as `'4d'`. diff --git a/documentation/functions/record/LOC_BUILDER_DD.md b/documentation/functions/record/LOC_BUILDER_DD.md deleted file mode 100644 index 18ea9768a8..0000000000 --- a/documentation/functions/record/LOC_BUILDER_DD.md +++ /dev/null @@ -1,74 +0,0 @@ ---- -name: LOC_BUILDER_DD -parameters: - - label - - x - - y - - alt - - ttl -parameter_types: - label: string - x: float32 - y: float32 - alt: float32 - ttl: int ---- - -`LOC_BUILDER_DD({})` actually takes an object with the following properties: - - - label (optional, defaults to `@`) - - x - - y - - alt - - ttl (optional) - -A helper to build [`LOC`](../domain/LOC.md) records. Supply four parameters instead of 12. - -Internally assumes some defaults for [`LOC`](../domain/LOC.md) records. - - -The cartesian coordinates are decimal degrees, like you typically find in e.g. Google Maps. - -Examples. - -Big Ben: -`51.50084265331501, -0.12462541415599787` - -The White House: -`38.89775977858357, -77.03655125982903` - - -{% code title="dnsconfig.js" %} -```javascript -D("example.com","none" - , LOC_BUILDER_DD({ - label: "big-ben", - x: 51.50084265331501, - y: -0.12462541415599787, - alt: 6, - }) - , LOC_BUILDER_DD({ - label: "white-house", - x: 38.89775977858357, - y: -77.03655125982903, - alt: 19, - }) - , LOC_BUILDER_DD({ - label: "white-house-ttl", - x: 38.89775977858357, - y: -77.03655125982903, - alt: 19, - ttl: "5m", - }) -); - -``` -{% endcode %} - - -Part of the series: - * [`LOC()`](../domain/LOC.md) - build a `LOC` by supplying all 12 parameters - * [`LOC_BUILDER_DD({})`](../record/LOC_BUILDER_DD.md) - accepts cartesian x, y - * [`LOC_BUILDER_DMS_STR({})`](../record/LOC_BUILDER_DMS_STR.md) - accepts DMS 33°51′31″S 151°12′51″E - * [`LOC_BUILDER_DMM_STR({})`](../record/LOC_BUILDER_DMM_STR.md) - accepts DMM 25.24°S 153.15°E - * [`LOC_BUILDER_STR({})`](../record/LOC_BUILDER_STR.md) - tries the cooordinate string in all `LOC_BUILDER_DM*_STR()` functions until one works diff --git a/documentation/functions/record/LOC_BUILDER_DMM_STR.md b/documentation/functions/record/LOC_BUILDER_DMM_STR.md deleted file mode 100644 index 736cf42651..0000000000 --- a/documentation/functions/record/LOC_BUILDER_DMM_STR.md +++ /dev/null @@ -1,54 +0,0 @@ ---- -name: LOC_BUILDER_DMM_STR -parameters: - - label - - str - - alt - - ttl -parameter_types: - label: string - str: string - alt: float32 - ttl: int ---- - -`LOC_BUILDER_DMM({})` actually takes an object with the following properties: - - - label (optional, defaults to `@`) - - str - - alt - - ttl (optional) - -A helper to build [`LOC`](../domain/LOC.md) records. Supply three parameters instead of 12. - -Internally assumes some defaults for [`LOC`](../domain/LOC.md) records. - - -Accepts a string with decimal minutes (DMM) coordinates in the form: 25.24°S 153.15°E - -Note that the following are acceptable forms (symbols differ): -* `25.24°S 153.15°E` -* `25.24 S 153.15 E` -* `25.24° S 153.15° E` -* `25.24S 153.15E` - -{% code title="dnsconfig.js" %} -```javascript -D("example.com","none" - LOC_BUILDER_STR({ - label: "tasmania", - str: '42°S 147°E', - alt: 3, - }) -); - -``` -{% endcode %} - - -Part of the series: - * [`LOC()`](../domain/LOC.md) - build a `LOC` by supplying all 12 parameters - * [`LOC_BUILDER_DD({})`](../record/LOC_BUILDER_DD.md) - accepts cartesian x, y - * [`LOC_BUILDER_DMS_STR({})`](../record/LOC_BUILDER_DMS_STR.md) - accepts DMS 33°51′31″S 151°12′51″E - * [`LOC_BUILDER_DMM_STR({})`](../record/LOC_BUILDER_DMM_STR.md) - accepts DMM 25.24°S 153.15°E - * [`LOC_BUILDER_STR({})`](../record/LOC_BUILDER_STR.md) - tries the cooordinate string in all `LOC_BUILDER_DM*_STR()` functions until one works diff --git a/documentation/functions/record/LOC_BUILDER_STR.md b/documentation/functions/record/LOC_BUILDER_STR.md deleted file mode 100644 index 0257674316..0000000000 --- a/documentation/functions/record/LOC_BUILDER_STR.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -name: LOC_BUILDER_STR -parameters: - - label - - str - - alt - - ttl -parameter_types: - label: string - str: string - alt: float32 - ttl: int ---- - -`LOC_BUILDER_STR({})` actually takes an object with the following: properties. - - - label (optional, defaults to `@`) - - str - - alt - - ttl (optional) - -A helper to build [`LOC`](../domain/LOC.md) records. Supply three parameters instead of 12. - -Internally assumes some defaults for [`LOC`](../domain/LOC.md) records. - - -Accepts a string and tries all `LOC_BUILDER_DM*_STR({})` methods: - * [`LOC_BUILDER_DMS_STR({})`](../record/LOC_BUILDER_DMS_STR.md) - accepts DMS 33°51′31″S 151°12′51″E - * [`LOC_BUILDER_DMM_STR({})`](../record/LOC_BUILDER_DMM_STR.md) - accepts DMM 25.24°S 153.15°E - - -{% code title="dnsconfig.js" %} -```javascript -D("example.com","none" - , LOC_BUILDER_STR({ - label: "old-faithful", - str: '44.46046°N 110.82815°W', - alt: 2240, - }) - , LOC_BUILDER_STR({ - label: "ribblehead-viaduct", - str: '54.210436°N 2.370231°W', - alt: 300, - }) - , LOC_BUILDER_STR({ - label: "guinness-brewery", - str: '53°20′40″N 6°17′20″W', - alt: 300, - }) -); - -``` -{% endcode %} - - -Part of the series: - * [`LOC()`](../domain/LOC.md) - build a `LOC` by supplying all 12 parameters - * [`LOC_BUILDER_DD({})`](../record/LOC_BUILDER_DD.md) - accepts cartesian x, y - * [`LOC_BUILDER_DMS_STR({})`](../record/LOC_BUILDER_DMS_STR.md) - accepts DMS 33°51′31″S 151°12′51″E - * [`LOC_BUILDER_DMM_STR({})`](../record/LOC_BUILDER_DMM_STR.md) - accepts DMM 25.24°S 153.15°E - * [`LOC_BUILDER_STR({})`](../record/LOC_BUILDER_STR.md) - tries the cooordinate string in all `LOC_BUILDER_DM*_STR()` functions until one works diff --git a/documentation/index.md b/documentation/index.md index 58b4a8ad79..1568e103b1 100644 --- a/documentation/index.md +++ b/documentation/index.md @@ -4,7 +4,7 @@ # Try It -Want to jump right in? Follow our [quick start tutorial](getting-started.md) on a new domain or [migrate](migrating.md) an existing one. Read the [language spec](js.md) for more info. +Want to jump right in? Follow our [quick start tutorial](getting-started.md) on a new domain or [migrate](migrating.md) an existing one. Read the [language spec](/documentation/02_language_reference/js.md) for more info. # Use It diff --git a/documentation/providers.md b/documentation/providers/providers.md similarity index 100% rename from documentation/providers.md rename to documentation/providers/providers.md diff --git a/documentation/providers/akamaiedgedns.md b/documentation/providers/providers/akamai_edge_dns.md similarity index 100% rename from documentation/providers/akamaiedgedns.md rename to documentation/providers/providers/akamai_edge_dns.md diff --git a/documentation/providers/route53.md b/documentation/providers/providers/amazon_route53.md similarity index 100% rename from documentation/providers/route53.md rename to documentation/providers/providers/amazon_route53.md diff --git a/documentation/providers/autodns.md b/documentation/providers/providers/autodns.md similarity index 100% rename from documentation/providers/autodns.md rename to documentation/providers/providers/autodns.md diff --git a/documentation/providers/axfrddns.md b/documentation/providers/providers/axfr+ddns.md similarity index 100% rename from documentation/providers/axfrddns.md rename to documentation/providers/providers/axfr+ddns.md diff --git a/documentation/providers/azure_dns.md b/documentation/providers/providers/azure_dns.md similarity index 100% rename from documentation/providers/azure_dns.md rename to documentation/providers/providers/azure_dns.md diff --git a/documentation/providers/bind.md b/documentation/providers/providers/bind.md similarity index 100% rename from documentation/providers/bind.md rename to documentation/providers/providers/bind.md diff --git a/documentation/providers/cloudflareapi.md b/documentation/providers/providers/cloudflare_api.md similarity index 100% rename from documentation/providers/cloudflareapi.md rename to documentation/providers/providers/cloudflare_api.md diff --git a/documentation/providers/cloudns.md b/documentation/providers/providers/cloudns.md similarity index 100% rename from documentation/providers/cloudns.md rename to documentation/providers/providers/cloudns.md diff --git a/documentation/providers/cscglobal.md b/documentation/providers/providers/csc_global.md similarity index 100% rename from documentation/providers/cscglobal.md rename to documentation/providers/providers/csc_global.md diff --git a/documentation/providers/desec.md b/documentation/providers/providers/desec.md similarity index 100% rename from documentation/providers/desec.md rename to documentation/providers/providers/desec.md diff --git a/documentation/providers/digitalocean.md b/documentation/providers/providers/digitalocean.md similarity index 100% rename from documentation/providers/digitalocean.md rename to documentation/providers/providers/digitalocean.md diff --git a/documentation/providers/dnsimple.md b/documentation/providers/providers/dnsimple.md similarity index 100% rename from documentation/providers/dnsimple.md rename to documentation/providers/providers/dnsimple.md diff --git a/documentation/providers/dnsmadeeasy.md b/documentation/providers/providers/dnsmadeeasy.md similarity index 100% rename from documentation/providers/dnsmadeeasy.md rename to documentation/providers/providers/dnsmadeeasy.md diff --git a/documentation/providers/dnsoverhttps.md b/documentation/providers/providers/dnsoverhttps.md similarity index 100% rename from documentation/providers/dnsoverhttps.md rename to documentation/providers/providers/dnsoverhttps.md diff --git a/documentation/providers/domainnameshop.md b/documentation/providers/providers/domainnameshop.md similarity index 100% rename from documentation/providers/domainnameshop.md rename to documentation/providers/providers/domainnameshop.md diff --git a/documentation/providers/easyname.md b/documentation/providers/providers/easyname.md similarity index 100% rename from documentation/providers/easyname.md rename to documentation/providers/providers/easyname.md diff --git a/documentation/providers/gandi_v5.md b/documentation/providers/providers/gandi_v5.md similarity index 100% rename from documentation/providers/gandi_v5.md rename to documentation/providers/providers/gandi_v5.md diff --git a/documentation/providers/gcloud.md b/documentation/providers/providers/gcloud.md similarity index 100% rename from documentation/providers/gcloud.md rename to documentation/providers/providers/gcloud.md diff --git a/documentation/providers/gcore.md b/documentation/providers/providers/gcore.md similarity index 100% rename from documentation/providers/gcore.md rename to documentation/providers/providers/gcore.md diff --git a/documentation/providers/hetzner.md b/documentation/providers/providers/hetzner.md similarity index 100% rename from documentation/providers/hetzner.md rename to documentation/providers/providers/hetzner.md diff --git a/documentation/providers/hexonet.md b/documentation/providers/providers/hexonet.md similarity index 100% rename from documentation/providers/hexonet.md rename to documentation/providers/providers/hexonet.md diff --git a/documentation/providers/hostingde.md b/documentation/providers/providers/hosting.de.md similarity index 100% rename from documentation/providers/hostingde.md rename to documentation/providers/providers/hosting.de.md diff --git a/documentation/providers/hedns.md b/documentation/providers/providers/hurricane_electric_dns.md similarity index 100% rename from documentation/providers/hedns.md rename to documentation/providers/providers/hurricane_electric_dns.md diff --git a/documentation/providers/internetbs.md b/documentation/providers/providers/internet.bs.md similarity index 100% rename from documentation/providers/internetbs.md rename to documentation/providers/providers/internet.bs.md diff --git a/documentation/providers/inwx.md b/documentation/providers/providers/inwx.md similarity index 100% rename from documentation/providers/inwx.md rename to documentation/providers/providers/inwx.md diff --git a/documentation/providers/linode.md b/documentation/providers/providers/linode.md similarity index 100% rename from documentation/providers/linode.md rename to documentation/providers/providers/linode.md diff --git a/documentation/providers/loopia.md b/documentation/providers/providers/loopia.md similarity index 100% rename from documentation/providers/loopia.md rename to documentation/providers/providers/loopia.md diff --git a/documentation/providers/luadns.md b/documentation/providers/providers/luadns.md similarity index 100% rename from documentation/providers/luadns.md rename to documentation/providers/providers/luadns.md diff --git a/documentation/providers/msdns.md b/documentation/providers/providers/microsoft_dns_server.md similarity index 100% rename from documentation/providers/msdns.md rename to documentation/providers/providers/microsoft_dns_server.md diff --git a/documentation/providers/namedotcom.md b/documentation/providers/providers/name.com.md similarity index 100% rename from documentation/providers/namedotcom.md rename to documentation/providers/providers/name.com.md diff --git a/documentation/providers/namecheap.md b/documentation/providers/providers/namecheap.md similarity index 100% rename from documentation/providers/namecheap.md rename to documentation/providers/providers/namecheap.md diff --git a/documentation/providers/netcup.md b/documentation/providers/providers/netcup.md similarity index 100% rename from documentation/providers/netcup.md rename to documentation/providers/providers/netcup.md diff --git a/documentation/providers/netlify.md b/documentation/providers/providers/netlify.md similarity index 100% rename from documentation/providers/netlify.md rename to documentation/providers/providers/netlify.md diff --git a/documentation/providers/ns1.md b/documentation/providers/providers/ns1.md similarity index 100% rename from documentation/providers/ns1.md rename to documentation/providers/providers/ns1.md diff --git a/documentation/providers/oracle.md b/documentation/providers/providers/oracle_cloud.md similarity index 100% rename from documentation/providers/oracle.md rename to documentation/providers/providers/oracle_cloud.md diff --git a/documentation/providers/ovh.md b/documentation/providers/providers/ovh.md similarity index 100% rename from documentation/providers/ovh.md rename to documentation/providers/providers/ovh.md diff --git a/documentation/providers/packetframe.md b/documentation/providers/providers/packetframe.md similarity index 100% rename from documentation/providers/packetframe.md rename to documentation/providers/providers/packetframe.md diff --git a/documentation/providers/porkbun.md b/documentation/providers/providers/porkbun.md similarity index 100% rename from documentation/providers/porkbun.md rename to documentation/providers/providers/porkbun.md diff --git a/documentation/providers/powerdns.md b/documentation/providers/providers/powerdns.md similarity index 100% rename from documentation/providers/powerdns.md rename to documentation/providers/providers/powerdns.md diff --git a/documentation/providers/rwth.md b/documentation/providers/providers/rwth.md similarity index 100% rename from documentation/providers/rwth.md rename to documentation/providers/providers/rwth.md diff --git a/documentation/providers/softlayer.md b/documentation/providers/providers/softlayer.md similarity index 100% rename from documentation/providers/softlayer.md rename to documentation/providers/providers/softlayer.md diff --git a/documentation/providers/transip.md b/documentation/providers/providers/transip.md similarity index 100% rename from documentation/providers/transip.md rename to documentation/providers/providers/transip.md diff --git a/documentation/providers/vultr.md b/documentation/providers/providers/vultr.md similarity index 100% rename from documentation/providers/vultr.md rename to documentation/providers/providers/vultr.md diff --git a/documentation/v316.md b/documentation/release/changelog_to_v316.md similarity index 100% rename from documentation/v316.md rename to documentation/release/changelog_to_v316.md diff --git a/documentation/release-engineering.md b/documentation/release/how_to_build_and_ship_a_release.md similarity index 100% rename from documentation/release-engineering.md rename to documentation/release/how_to_build_and_ship_a_release.md diff --git a/main.go b/main.go index 758f54048c..26b52d8f60 100644 --- a/main.go +++ b/main.go @@ -12,7 +12,7 @@ import ( "github.com/fatih/color" ) -//go:generate go run build/generate/generate.go build/generate/featureMatrix.go build/generate/functionTypes.go build/generate/dtsFile.go +//go:generate go run build/generate/generate.go build/generate/featureMatrix.go build/generate/functionTypes.go build/generate/dtsFile.go build/generate/docuTOC.go // Version management. Goals: // 1. Someone who just does "go get" has at least some information.