build(docs-infra): ensure that CLI code blocks are not auto-linked (#26675)
Some of the text in CLI API docs were being auto-linked to API pages. This was not correct, and in fact these blocks should not have any auto links to Angular API at all. Closes #26570 PR Close #26675
This commit is contained in:
parent
9ff8155cd9
commit
07509da78d
|
@ -17,8 +17,8 @@
|
|||
<tbody>
|
||||
{% for command in doc.commands %}
|
||||
<tr>
|
||||
<td><a class="code-anchor" href="{$ command.path $}"><code>{$ command.name $}</code></a></td>
|
||||
<td>{% for alias in command.commandAliases %}<code>{$ alias $} </code>{% endfor %}</td>
|
||||
<td><a class="code-anchor" href="{$ command.path $}"><code class="no-auto-link">{$ command.name $}</code></a></td>
|
||||
<td>{% for alias in command.commandAliases %}<code class="no-auto-link">{$ alias $} </code>{% endfor %}</td>
|
||||
<td>{$ command.description | marked $}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{% macro renderSyntax(container, prefix) -%}
|
||||
{% for name in container.names %}
|
||||
<code-example hideCopy="true" class="no-box api-heading">ng {%if prefix %}{$ prefix $} {% endif %}<span class="cli-name">{$ name $}</span>
|
||||
<code-example hideCopy="true" class="no-box api-heading no-auto-link">ng {%if prefix %}{$ prefix $} {% endif %}<span class="cli-name">{$ name $}</span>
|
||||
{%- for arg in container.positionalOptions %} <<var>{$ arg.name $}</var>>{% endfor %}
|
||||
{%- if container.namedOptions.length %} [<var>options</var>]{% endif -%}
|
||||
</code-example>
|
||||
|
@ -20,14 +20,14 @@
|
|||
<tbody>
|
||||
{% for option in arguments %}
|
||||
<tr class="cli-option">
|
||||
<td><code><<var>{$ option.name $}</var>></code></td>
|
||||
<td><code class="no-auto-link"><<var>{$ option.name $}</var>></code></td>
|
||||
<td>
|
||||
{$ option.description | marked $}
|
||||
{% if option.subcommands.length -%}
|
||||
<p>This option can take one of the following <a href="#{$ option.name $}-commands">sub-commands</a>:<p>
|
||||
<ul>
|
||||
{% for subcommand in option.subcommands %}
|
||||
<li><code><a class="code-anchor" href="#{$ subcommand.name $}-command">{$ subcommand.name $}</a></code></li>
|
||||
<li><code class="no-auto-link"><a class="code-anchor" href="#{$ subcommand.name $}-command">{$ subcommand.name $}</a></code></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{%- endif %}
|
||||
|
@ -53,11 +53,11 @@
|
|||
{% for option in options %}
|
||||
<tr class="cli-option">
|
||||
<td>
|
||||
<code class="cli-option-syntax">{$ renderOption(option.name, option.type, option.default, option.enum) $}</code>
|
||||
<code class="cli-option-syntax no-auto-link">{$ renderOption(option.name, option.type, option.default, option.enum) $}</code>
|
||||
</td>
|
||||
<td>
|
||||
{$ option.description | marked $}
|
||||
{% if option.default !== undefined %}<p><span class="cli-default">Default:</span> <code>{$ option.default $}</code></p>{% endif %}
|
||||
{% if option.default !== undefined %}<p><span class="cli-default">Default:</span> <code class="no-auto-link">{$ option.default $}</code></p>{% endif %}
|
||||
{% if option.aliases.length %}<p><span class="cli-aliases">Aliases:</span> {% for alias in option.aliases %}{$ renderOptionName(alias) $}{% if not loop.last %}, {% endif %}{% endfor %}</p>{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -92,7 +92,7 @@
|
|||
{% for command in container.positionalOptions %}{% if command.subcommands.length %}
|
||||
<h2><a id="{$ command.name $}-commands"></a>{$ command.name | title $} commands</h2>
|
||||
{% for subcommand in command.subcommands %}
|
||||
<h3><code><a id="{$ subcommand.name $}-command"></a>{$ subcommand.name $}</code></h3>
|
||||
<h3><code class="no-auto-link"><a id="{$ subcommand.name $}-command"></a>{$ subcommand.name $}</code></h3>
|
||||
{% for name in container.names %}
|
||||
{$ renderSyntax(subcommand, name) $}
|
||||
{% endfor %}
|
||||
|
|
Loading…
Reference in New Issue