@inline-tutorial

.. @inline-tutorial::
语法
{@tutorial tutorialID}
[link text]{@tutorial tutorialID}
{@tutorial tutorialID|link text}
{@tutorial tutorialID link text (after the first space)}
概述

The @tutorial inline tag creates a link to the tutorial identifier that you specify. When you use the @tutorial tag, you can also provide link text, using one of several different formats. If you don’t provide any link text, JSDoc uses the tutorial’s title as the link text.

If you need to link to a namepath or a URL, use the @link @inline instead of the @tutorial tag.

示例

The following example shows all of the ways to provide link text for the @tutorial tag:

Providing link text
/**
 * See {@tutorial gettingstarted} and [Configuring the Dashboard]{@tutorial dashboard}.
 * For more information, see {@tutorial create|Creating a Widget} and
 * {@tutorial destroy Destroying a Widget}.
 */
function myFunction() {}

如果定义了所有这些教程, 并且``gettingstarted``教程的标题是“Getting Started”, 则上面的示例将生成类似于以下内容的输出:

Output for @link tags
See <a href="tutorial-gettingstarted.html">Getting Started</a> and
<a href="tutorial-dashboard.html">Configuring the Dashboard</a>.
For more information, see <a href="tutorial-create.html">Creating a Widget</a> and
<a href="tutorial-destroy.html">Destroying a Widget</a>.