chore: move cli data files to data subdir

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
This commit is contained in:
David Karlsson
2026-02-22 10:10:21 +01:00
parent 70d0c07c69
commit 4899ea2cf1
373 changed files with 41 additions and 49 deletions

View File

@@ -61,7 +61,7 @@ jobs:
const yamlSrcFilename = path.basename(yamlSrcPath);
const yamlSrcNoExt = yamlSrcPath.replace(".yaml", "");
const hasSubCommands = (await (await glob.create(yamlSrcNoExt)).glob()).length > 1;
const yamlDestPath = path.join('data', `${{ inputs.data-files-folder }}`, yamlSrcFilename);
const yamlDestPath = path.join('data', 'cli', `${{ inputs.data-files-folder }}`, yamlSrcFilename);
let placeholderPath = path.join("content/reference/cli", yamlSrcFilename.replace('_', '/').replace(/\.yaml$/, '.md'));
if (hasSubCommands) {
placeholderPath = placeholderPath.replace('.md', '/_index.md');

View File

@@ -18,48 +18,40 @@
so they still appear in the sidebar navigation.
*/ -}}
{{- $folders := slice
"engine-cli" "buildx" "compose-cli" "model-cli" "mcp-cli"
"sandbox-cli" "offload-cli" "scout-cli" "desktop-cli"
"init-cli" "debug-cli" "secrets-engine"
-}}
{{- range $folder, $files := site.Data.cli -}}
{{- range $name, $data := $files -}}
{{- /* Skip hidden commands */ -}}
{{- if $data.hidden -}}
{{- continue -}}
{{- end -}}
{{- range $folder := $folders -}}
{{- with index site.Data $folder -}}
{{- range $name, $data := . -}}
{{- /* Skip hidden commands */ -}}
{{- if $data.hidden -}}
{{- continue -}}
{{- end -}}
{{- /* Skip alias/shortcut commands: if any alias has more words than
the command, a longer canonical form exists elsewhere. */ -}}
{{- $cmdWords := len (split $data.command " ") -}}
{{- $isAlias := false -}}
{{- with $data.aliases -}}
{{- range (split . ", ") -}}
{{- if gt (len (split . " ")) $cmdWords -}}
{{- $isAlias = true -}}
{{- end -}}
{{- /* Skip alias/shortcut commands: if any alias has more words than
the command, a longer canonical form exists elsewhere. */ -}}
{{- $cmdWords := len (split $data.command " ") -}}
{{- $isAlias := false -}}
{{- with $data.aliases -}}
{{- range (split . ", ") -}}
{{- if gt (len (split . " ")) $cmdWords -}}
{{- $isAlias = true -}}
{{- end -}}
{{- end -}}
{{- if $isAlias -}}
{{- continue -}}
{{- end -}}
{{- $path := replace $data.command " " "/" -}}
{{- $kind := "page" -}}
{{- with $data.cname -}}
{{- $kind = "section" -}}
{{- end -}}
{{- $.AddPage (dict
"path" $path
"title" $data.command
"kind" $kind
"params" (dict "datafolder" $folder "datafile" $name)
) -}}
{{- end -}}
{{- if $isAlias -}}
{{- continue -}}
{{- end -}}
{{- $path := replace $data.command " " "/" -}}
{{- $kind := "page" -}}
{{- with $data.cname -}}
{{- $kind = "section" -}}
{{- end -}}
{{- $.AddPage (dict
"path" $path
"title" $data.command
"kind" $kind
"params" (dict "datafolder" $folder "datafile" $name)
) -}}
{{- end -}}
{{- end -}}

Some files were not shown because too many files have changed in this diff Show More