mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
docs: restructure docs (#14421)
Closes #13434 Supersedes #14182 --------- Co-authored-by: Ethan <39577870+ethanndickson@users.noreply.github.com> Co-authored-by: Ethan Dickson <ethan@coder.com> Co-authored-by: Ben Potter <ben@coder.com> Co-authored-by: Stephen Kirby <58410745+stirby@users.noreply.github.com> Co-authored-by: Stephen Kirby <me@skirby.dev> Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com> Co-authored-by: Edward Angert <EdwardAngert@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
288df75686
commit
419eba5fb6
@@ -17,7 +17,7 @@ import (
|
||||
|
||||
const (
|
||||
apiSubdir = "reference/api"
|
||||
apiIndexFile = "README.md"
|
||||
apiIndexFile = "index.md"
|
||||
apiIndexContent = `Get started with the Coder API:
|
||||
|
||||
## Quickstart
|
||||
@@ -38,7 +38,7 @@ curl https://coder.example.com/api/v2/workspaces?q=owner:me \
|
||||
|
||||
## Use cases
|
||||
|
||||
See some common [use cases](../../admin/automation.md#use-cases) for the REST API.
|
||||
See some common [use cases](../../reference/index.md#use-cases) for the REST API.
|
||||
|
||||
## Sections
|
||||
|
||||
|
||||
@@ -18,8 +18,8 @@ var (
|
||||
auditDocFile string
|
||||
dryRun bool
|
||||
|
||||
generatorPrefix = []byte("<!-- Code generated by 'make docs/admin/audit-logs.md'. DO NOT EDIT -->")
|
||||
generatorSuffix = []byte("<!-- End generated by 'make docs/admin/audit-logs.md'. -->")
|
||||
generatorPrefix = []byte("<!-- Code generated by 'make docs/admin/security/audit-logs.md'. DO NOT EDIT -->")
|
||||
generatorSuffix = []byte("<!-- End generated by 'make docs/admin/security/audit-logs.md'. -->")
|
||||
)
|
||||
|
||||
/*
|
||||
@@ -39,7 +39,7 @@ and has the following structure:
|
||||
type AuditableResourcesMap map[string]map[string]bool
|
||||
|
||||
func main() {
|
||||
flag.StringVar(&auditDocFile, "audit-doc-file", "docs/admin/audit-logs.md", "Path to audit log doc file")
|
||||
flag.StringVar(&auditDocFile, "audit-doc-file", "docs/admin/security/audit-logs.md", "Path to audit log doc file")
|
||||
flag.BoolVar(&dryRun, "dry-run", false, "Dry run")
|
||||
flag.Parse()
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ func fullName(cmd *serpent.Command) string {
|
||||
func fmtDocFilename(cmd *serpent.Command) string {
|
||||
if cmd.FullName() == "coder" {
|
||||
// Special case for index.
|
||||
return "./README.md"
|
||||
return "./index.md"
|
||||
}
|
||||
name := strings.ReplaceAll(fullName(cmd), " ", "_")
|
||||
return fmt.Sprintf("%s.md", name)
|
||||
|
||||
@@ -20,13 +20,13 @@ var (
|
||||
prometheusDocFile string
|
||||
dryRun bool
|
||||
|
||||
generatorPrefix = []byte("<!-- Code generated by 'make docs/admin/prometheus.md'. DO NOT EDIT -->")
|
||||
generatorSuffix = []byte("<!-- End generated by 'make docs/admin/prometheus.md'. -->")
|
||||
generatorPrefix = []byte("<!-- Code generated by 'make docs/admin/integrations/prometheus.md'. DO NOT EDIT -->")
|
||||
generatorSuffix = []byte("<!-- End generated by 'make docs/admin/integrations/prometheus.md'. -->")
|
||||
)
|
||||
|
||||
func main() {
|
||||
flag.StringVar(&metricsFile, "metrics-file", "scripts/metricsdocgen/metrics", "Path to Prometheus metrics file")
|
||||
flag.StringVar(&prometheusDocFile, "prometheus-doc-file", "docs/admin/prometheus.md", "Path to Prometheus doc file")
|
||||
flag.StringVar(&prometheusDocFile, "prometheus-doc-file", "docs/admin/integrations/prometheus.md", "Path to Prometheus doc file")
|
||||
flag.BoolVar(&dryRun, "dry-run", false, "Dry run")
|
||||
flag.Parse()
|
||||
|
||||
|
||||
@@ -198,5 +198,5 @@ Compare: [\`${old_version}...${new_version}\`](https://github.com/coder/coder/co
|
||||
|
||||
## Install/upgrade
|
||||
|
||||
Refer to our docs to [install](https://coder.com/docs/install) or [upgrade](https://coder.com/docs/admin/upgrade) Coder, or use a release asset below.
|
||||
Refer to our docs to [install](https://coder.com/docs/install) or [upgrade](https://coder.com/docs/install/upgrade) Coder, or use a release asset below.
|
||||
"
|
||||
|
||||
Reference in New Issue
Block a user