mirror of
https://github.com/docker/docs.git
synced 2026-11-04 10:01:00 +00:00
chore: move cli data files to data subdir
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
This commit is contained in:
373 files changed
+41
-49
No files matched your search
@@ -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');
|
||||
|
||||
@@ -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 -}}
|
||||
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loaded 100 of 373 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user