From b8610d493ab06b832a8a924bbf59310c22d37a83 Mon Sep 17 00:00:00 2001 From: Ruslan Sayfutdinov Date: Fri, 25 Oct 2024 12:11:19 +0100 Subject: [PATCH] docs: Fill reference title page --- .../docs/reference/commands/index.md | 7 +++++++ assets/chezmoi.io/docs/reference/index.md | 18 +++++++++++++++++- assets/chezmoi.io/mkdocs.yml | 1 + internal/cmd/cmd.go | 3 +++ 4 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 assets/chezmoi.io/docs/reference/commands/index.md diff --git a/assets/chezmoi.io/docs/reference/commands/index.md b/assets/chezmoi.io/docs/reference/commands/index.md new file mode 100644 index 00000000000..7f200bc5152 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/commands/index.md @@ -0,0 +1,7 @@ +# Commands + +This section provides documentation for chezmoi commands and their arguments. + +All commands accept [global flags](../command-line-flags/global.md), +though some flags may have no effect on certain commands. +Many commands also share [common flags](../command-line-flags/common.md). diff --git a/assets/chezmoi.io/docs/reference/index.md b/assets/chezmoi.io/docs/reference/index.md index 7907d94fb4a..2d047c89431 100644 --- a/assets/chezmoi.io/docs/reference/index.md +++ b/assets/chezmoi.io/docs/reference/index.md @@ -1,3 +1,19 @@ # Reference -Manage your dotfiles across multiple machines, securely. +Welcome to the reference section of the chezmoi documentation. + +This reference covers the following topics: + +- [Key concepts](concepts.md) +- [Source state attributes](source-state-attributes.md) +- [Target types](target-types.md) +- [Application order of changes](application-order.md) +- [Configuration file](configuration-file/index.md) +- [Special files](special-files/index.md) and [special directories](special-directories/index.md) +- [Commands](commands/index.md) +- [Templates](templates/index.md) + - [Variables](templates/variables.md) + - [Directives](templates/directives.md) + - [Functions](templates/functions/index.md) +- [Plugins support](plugins.md) +- [Release history](release-history.md) diff --git a/assets/chezmoi.io/mkdocs.yml b/assets/chezmoi.io/mkdocs.yml index 3e19bd8a3d8..7e6c0dd3326 100644 --- a/assets/chezmoi.io/mkdocs.yml +++ b/assets/chezmoi.io/mkdocs.yml @@ -142,6 +142,7 @@ nav: - .chezmoiscripts: reference/special-directories/chezmoiscripts.md - .chezmoitemplates: reference/special-directories/chezmoitemplates.md - Commands: + - reference/commands/index.md - add: reference/commands/add.md - age: reference/commands/age.md - apply: reference/commands/apply.md diff --git a/internal/cmd/cmd.go b/internal/cmd/cmd.go index 16b80847cae..38db99981eb 100644 --- a/internal/cmd/cmd.go +++ b/internal/cmd/cmd.go @@ -84,6 +84,9 @@ func init() { } for _, dirEntry := range dirEntries { + if dirEntry.Name() == "index.md" { + continue + } command := strings.TrimSuffix(dirEntry.Name(), ".md") data, err := commands.FS.ReadFile(dirEntry.Name()) if err != nil {