cli: remove redundant links to parent/child/related commands

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
This commit is contained in:
David Karlsson 2023-07-04 14:24:22 +02:00
parent a6828055b1
commit 083ffc0a6b
1 changed files with 0 additions and 67 deletions

View File

@ -154,70 +154,3 @@ For example uses of this command, refer to the [examples section](#examples) bel
{{ controller_data.examples | replace_relative_links: page.path }}
{% endif %}
{% if controller_data.pname %}
{% unless controller_data.pname == include.datafile or controller_data.pname == "docker" %}
## Parent command
{% capture parentfile %}{{ controller_data.plink | remove_first: ".yaml" | remove_first: "docker_" }}{% endcapture %}
{% capture parentdatafile %}{{ controller_data.plink | remove_first: ".yaml" }}{% endcapture %}
{% capture parentDesc %}{{ site.data[include.datafolder][parentdatafile].short }}{% endcapture %}
| Command | Description |
|:---------------------------------------------------------------|:-----------------|
| [{{ controller_data.pname }}]({{parentPath}}{{ parentfile }}/) | {{ parentDesc }} |
{% endunless %}
{% endif %}
{% if controller_data.cname %}
## Child commands
<table>
<thead>
<tr>
<td>Command</td>
<td>Description</td>
</tr>
</thead>
<tbody>
{% for command in controller_data.cname %}
{% unless command.hidden %}
{% capture dataFileName %}{{ command | strip | replace: " ", "_" }}{% endcapture %}
<tr>
<td markdown="span">[{{ command }}]({{ parentPath }}{{ dataFileName | remove_first: "docker_" }}/)</td>
<td markdown="span">{{ site.data[include.datafolder][dataFileName].short }}</td>
</tr>
{% endunless %}
{% endfor %}
</tbody>
</table>
{% endif %}
{% unless controller_data.pname == "docker" or controller_data.pname == "dockerd" or include.datafile=="docker" %}
## Related commands
<table>
<thead>
<tr>
<td>Command</td>
<td>Description</td>
</tr>
</thead>
<tbody>
{% for command in site.data[include.datafolder][parentdatafile].cname %}
{% unless command.hidden %}
{% capture dataFileName %}{{ command | strip | replace: " ", "_" }}{% endcapture %}
<tr>
<td markdown="span">[{{ command }}]({{ parentPath }}{{ dataFileName | remove_first: "docker_" }}/)</td>
<td markdown="span">{{ site.data[include.datafolder][dataFileName].short }}</td>
</tr>
{% endunless %}
{% endfor %}
</tbody>
</table>
{% endunless %}