Skip to content

Commit 4899ea2

Browse files
committed
chore: move cli data files to data subdir
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
1 parent 70d0c07 commit 4899ea2

373 files changed

Lines changed: 40 additions & 48 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/validate-upstream.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
const yamlSrcFilename = path.basename(yamlSrcPath);
6262
const yamlSrcNoExt = yamlSrcPath.replace(".yaml", "");
6363
const hasSubCommands = (await (await glob.create(yamlSrcNoExt)).glob()).length > 1;
64-
const yamlDestPath = path.join('data', `${{ inputs.data-files-folder }}`, yamlSrcFilename);
64+
const yamlDestPath = path.join('data', 'cli', `${{ inputs.data-files-folder }}`, yamlSrcFilename);
6565
let placeholderPath = path.join("content/reference/cli", yamlSrcFilename.replace('_', '/').replace(/\.yaml$/, '.md'));
6666
if (hasSubCommands) {
6767
placeholderPath = placeholderPath.replace('.md', '/_index.md');

content/reference/cli/_content.gotmpl

Lines changed: 29 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -18,48 +18,40 @@
1818
so they still appear in the sidebar navigation.
1919
*/ -}}
2020

21-
{{- $folders := slice
22-
"engine-cli" "buildx" "compose-cli" "model-cli" "mcp-cli"
23-
"sandbox-cli" "offload-cli" "scout-cli" "desktop-cli"
24-
"init-cli" "debug-cli" "secrets-engine"
25-
-}}
26-
27-
{{- range $folder := $folders -}}
28-
{{- with index site.Data $folder -}}
29-
{{- range $name, $data := . -}}
30-
{{- /* Skip hidden commands */ -}}
31-
{{- if $data.hidden -}}
32-
{{- continue -}}
33-
{{- end -}}
21+
{{- range $folder, $files := site.Data.cli -}}
22+
{{- range $name, $data := $files -}}
23+
{{- /* Skip hidden commands */ -}}
24+
{{- if $data.hidden -}}
25+
{{- continue -}}
26+
{{- end -}}
3427

35-
{{- /* Skip alias/shortcut commands: if any alias has more words than
36-
the command, a longer canonical form exists elsewhere. */ -}}
37-
{{- $cmdWords := len (split $data.command " ") -}}
38-
{{- $isAlias := false -}}
39-
{{- with $data.aliases -}}
40-
{{- range (split . ", ") -}}
41-
{{- if gt (len (split . " ")) $cmdWords -}}
42-
{{- $isAlias = true -}}
43-
{{- end -}}
28+
{{- /* Skip alias/shortcut commands: if any alias has more words than
29+
the command, a longer canonical form exists elsewhere. */ -}}
30+
{{- $cmdWords := len (split $data.command " ") -}}
31+
{{- $isAlias := false -}}
32+
{{- with $data.aliases -}}
33+
{{- range (split . ", ") -}}
34+
{{- if gt (len (split . " ")) $cmdWords -}}
35+
{{- $isAlias = true -}}
4436
{{- end -}}
4537
{{- end -}}
46-
{{- if $isAlias -}}
47-
{{- continue -}}
48-
{{- end -}}
49-
50-
{{- $path := replace $data.command " " "/" -}}
51-
{{- $kind := "page" -}}
52-
{{- with $data.cname -}}
53-
{{- $kind = "section" -}}
54-
{{- end -}}
38+
{{- end -}}
39+
{{- if $isAlias -}}
40+
{{- continue -}}
41+
{{- end -}}
5542

56-
{{- $.AddPage (dict
57-
"path" $path
58-
"title" $data.command
59-
"kind" $kind
60-
"params" (dict "datafolder" $folder "datafile" $name)
61-
) -}}
43+
{{- $path := replace $data.command " " "/" -}}
44+
{{- $kind := "page" -}}
45+
{{- with $data.cname -}}
46+
{{- $kind = "section" -}}
6247
{{- end -}}
48+
49+
{{- $.AddPage (dict
50+
"path" $path
51+
"title" $data.command
52+
"kind" $kind
53+
"params" (dict "datafolder" $folder "datafile" $name)
54+
) -}}
6355
{{- end -}}
6456
{{- end -}}
6557

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)