mirror of https://github.com/docker/docs.git
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:
parent
a6828055b1
commit
083ffc0a6b
|
@ -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 }}
|
{{ controller_data.examples | replace_relative_links: page.path }}
|
||||||
|
|
||||||
{% endif %}
|
{% 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 %}
|
|
||||||
|
|
Loading…
Reference in New Issue