diff --git a/Jake/articles/about-inline-tags b/Jake/articles/about-inline-tags new file mode 100644 index 00000000..9c9d0068 --- /dev/null +++ b/Jake/articles/about-inline-tags @@ -0,0 +1,236 @@ + +

+ Table of Contents +

+
    +
  1. Links to other symbols + +
      +
    1. @link +
    2. +
    3. Intelligent @link rendering. +
    4. +
    5. @linkplain +
    6. +
    7. @linkcode +
    8. +
    9. Example +
    10. +
    +
  2. +
  3. Links to tutorials, @tutorial +
  4. +
  5. See also +
  6. +
+ +

+JSDoc has a number of inline tags. +These are different to its normal tags, because they can occur within the content of other tags. +The inline tags mainly provide ways to create links or cross-references to other parts of the documentation. +

+ +

+@tutorial tags form links to tutorials. +

+

+@link tags form links to everything else: external URLs or other JSDoc symbols. +Using the @linkcode tag forces the link's text to be rendered in monospace (useful if you are @link-ing to, say, a constant). Using the @linkplain tag keeps the link's text as-is. +

+

+Furthermore, the configuration options template.monospaceLinks and templates.cleverLinks can automatically render @link tags in monospace all the time or when the link is non-external respectively. +

+ + +

+The @link, @linkcode and @linkplain tags allow links to other documented objects or external URLs to be created within doclets. +

+

+You need to use a symbol's full name to have it linked (e.g. {@link MyNamespace.MyClass#property} rather than MyClass#property). +Also, remember that @modules, @externals and @events are prefixed by the tag name (e.g. "module:myModule"). +

+ +{{#example}}Linking modules, externals and events. +/** A module. Refer to it using {@link module:foo/bar}. + * @module foo/bar + */ +/** The built in string object. Refer to it with {@link external:String}. + * @external String + */ +/** An event. Refer to with {@link module:foo/bar.event:MyEvent}. + * @event module:foo/bar.event:MyEvent + */ +{{/example}} + + +{{#example}}Syntax +{@link someNamepathOrURL} +[link text here]{@link someNamepathOrURL} +{@link someNamepathOrURL|link text here} +{@link someNamepathOrURL Link text here (after the first space)} +{{/example}} +

The {@link ...} tag creates a (HTML) link in the generated output to the specified symbol or URL. +A link text may be provided using the forms specified above. +If it isn't given, then the URL/symbol path is used as the link text. +If the symbol path doesn't exist, then the link is not created (the link text is still shown though). +

+ +{{#example}}Using @link +/** See {@link MyClass} and [MyClass's foo property]{@link MyClass#foo}. + * Also check out {@link http://www.google.com|google} and {@link http://github.com Github}. + */ +function myFunction() {} + +/** A class. + * @class */ +function MyClass() { + /** foo property */ + this.foo = 1; +} +{{/example}} + +

+The above produces (except that the first two links actually link to the generated documentation for MyClass and MyClass#foo): +

+ +

+See MyClass and MyClass's foo property. +Also check out google and Github. +

+ +

+By default, {@link ...} just generates HTML <a href="link URL">link text</code>. +It may be of interest to have link texts always rendered in monospace, particularly if it's a link to another code object. For example, you may want "{@link MY_CONSTANT}" to be rendered MY_CONSTANT rather than MY_CONSTANT. +

+ +

There are a number of ways to deal with this: +

+

+ + +

+The configuration options templates.monospaceLinks and templates.cleverLinks can be used to specify how @link captions appear. +

+ +

+By default both options are switched off. Turn either of them on by modifying your conf.json: +

+{{#example}}conf.json +{ + ... + "templates": { + // in this example we turn cleverLinks on. + "cleverLinks": true, + "monospaceLinks": false + }, + ... +} +{{/example}} + +

+When templates.monospaceLinks is true, all @link tags appear in monospace font. +For example, "{@link asdf}" will become asdf. +Use @linkplain if you want a link to not be monospace. +

+ +

+When templates.cleverLinks is true, @links to external URLs (http or ftp) appear in normal font, while @links to other symbols (like classes, members, functions) will appear in monospace. +

+ +

+If both options are true, templates.cleverLinks is used. +

+ +

The @linkplain tag

+{{#example}}Syntax +{@linkplain someNamepathOrURL} +[link text here]{@linkplain someNamepathOrURL} +{@linkplain someNamepathOrURL|link text here} +{@linkplain someNamepathOrURL Link text here (after the first space)} +{{/example}} + +

+The @linkplain tag is exactly the same as @link, but ensures that the link text is not turned into monospace if you had templates.monospaceLinks or templates.cleverLinks turned on. +

+ +

+For example, if I turned templates.monospaceLinks on and wrote "{@link fooBar}", it would render fooBar. However, if I write "{@linkplain fooBar}" it will render fooBar. +

+ +

The @linkcode tag

+{{#example}}Syntax +{@linkcode someNamepathOrURL} +[link text here]{@linkcode someNamepathOrURL} +{@linkcode someNamepathOrURL|link text here} +{@linkcode someNamepathOrURL Link text here (after the first space)} +{{/example}} + +

+The @linkcode tag is exactly the same as @link, but renders the link caption in monospace. +For example, "{@linkcode fooBar}" turns into fooBar. +

+ + +

+Suppose I had templates.cleverLinks switched on and a file like so: +

+ +{{#example}} +/** This is a variable {@link FOO}, cleverLinks makes this monospace. + * This is a link to external site {@link http://www.github.com|Github}, not monospace as it's external. + * This is a link to {@linkplain FOO}, but we forced it not to be monospace. + * This is a link to {@linkcode http://www.github.com Github}, but we forced it to be monospace. + * @const + */ +var FOO = 1; +{{/example}} + +

+will become: +

+ +

+This is a variable FOO, cleverLinks makes this monospace.
+This is a link to external site Github, not monospace as it's external.
+This is a link to FOO, but we forced it not to be monospace.
+This is a link to Github, but we forced it to be monospace. +

+ +

+If we had templates.monospaceLinks on instead, all the links would be monospace except for the "{@linkplain FOO}". +If we had both options off (the default), all links would be in normal font except for the "{@linkcode http://www.github.com Github}". +

+ +

Links to other tutorials (@tutorial)

+{{#example}}Syntax +{@tutorial tutorialID} +{{/example}} + +

+In its in-line usage the @tutorial tag is exactly like @link, but for tutorials (and the link text is always in normal font). +See the tutorials tutorial for more information on setting up tutorials. +The @tutorial tag may also be used in block format; see the @tutorial page for more information. +

+ +{{#example}}Using @tutorial inline. +/** Description. + * Check out {@tutorial tutorial1} and {@tutorial tutorial2}. + * @class + */ +{{/example}} + +

See Also

+ diff --git a/Jake/articles/about-namepaths b/Jake/articles/about-namepaths index 591d49bb..c0c10850 100644 --- a/Jake/articles/about-namepaths +++ b/Jake/articles/about-namepaths @@ -9,10 +9,10 @@ When referring to a JavaScript variable that is elsewhere in your documentation, you must provide a unique identifier that maps to that variable. A namepath provides a way to do so and disambiguate between instance members, static members and inner variables.

-{{#example}}Basic Syntax Examples of Nameptahs in JSDoc 3 +{{#example}}Basic Syntax Examples of Namepaths in JSDoc 3 myFunction MyConstructor -MyConstructor#instancMember +MyConstructor#instanceMember MyConstructor.staticMember MyConstructor~innerMember // note that JSDoc 2 uses a dash {{/example}} @@ -82,3 +82,24 @@ In this case, to refer to the method named "consider," you would use the followi

This chaining can be used with any combination of the connecting symbols: # . ~

+ +{{#example}}Special cases: modules, externals and events. +/** A module. Its name is module:foo/bar. + * @module foo/bar + */ +/** The built in string object. Its name is external:String. + * @external String + */ +/** An event. Its name is module:foo/bar.event:MyEvent. + * @event module:foo/bar.event:MyEvent + */ +{{/example}} + +

+There are some special cases with namepaths: @modules are prefixed by "module:", @externals are prefixed by "external:", and @event names are prefixed by "event:". +

+ +

See Also

+ diff --git a/Jake/articles/index b/Jake/articles/index index 9f2b54d5..b1860d02 100644 --- a/Jake/articles/index +++ b/Jake/articles/index @@ -36,6 +36,8 @@
Additional longtext tutorials for your code.
Adding Content to Index.html
Using Readme files to add content to the default index.html
+
Linking using inline tags
+
All about inline tags @link, @linkplain, @linkcode, @tutorial.
All about plugins
Installing plugins and writing your own.
Configuring the markdown plugin
@@ -62,6 +64,8 @@

JSDoc 3 Tag Dictionary

+
Inline tags
+
All about inline tags {@link ...}, {@linkplain ...}, {@linkcode ...}, {@tutorial ...}.
{{#tagRefEntry}} {{tagRefEntry}} {{/tagRefEntry}} diff --git a/Jake/articles/tags-link b/Jake/articles/tags-link new file mode 100644 index 00000000..02069e1f --- /dev/null +++ b/Jake/articles/tags-link @@ -0,0 +1,137 @@ + +

Syntax

+ +{@link someSymbol}
+{@link http://some.url.com}
+[caption here]{@link someSymbol}
+[caption here]{@link http://some.url.com}
+{@link someSymbol|caption here}
+{@link http://some.url.com|caption here}
+{@link http://some.url.com Caption Here (after the first space)}
+{@link someSymbol Caption Here (after the first space)} +
+

+The following work in the same way as @link but render in monospace or normal font respectively: +

+ +{@linkcode ...}
+{@linkplain ...} +
+ +

Overview

+

+The @link, @linkcode and @linkplain tags allow links to other documented objects or external URLs to be created within doclets (i.e., within the content of other tags). +

+ +

+You need to use a symbol's full name to have it linked (e.g. {@link MyNamespace.MyClass#property} rather than MyClass#property). +Also, remember that @modules, @externals and @events are prefixed by the tag name (e.g. "module:myModule"). +

+ +

The {@link ...} tag creates a (HTML) link in the generated output to the specified symbol or URL. +A link caption different to the link itself may be provided using the syntax specified above. +If the linked object doesn't exist, then the output is kept as text rather than turned into a link. +

+ +

+By default, {@link ...} just generates the HTML <a href="link URL">link text</code>. +It may be of interest to have link texts always rendered in monospace, particularly if it's a link to another code object. For example, you may want "{@link MY_CONSTANT}" to be rendered MY_CONSTANT rather than MY_CONSTANT. +

+ +

+To achieve this one can use @linkcode. It is exactly the same as @link, but renders the link caption in monospace. +For example, "{@linkcode fooBar}" turns into fooBar. +

+ +

+The @linkplain tag is opposite to @linkcode; it ensures that the link text is kept as-is, i.e. not turned into monospace. +

+ +

+If you want all @links to be rendered in monospace by default, you can set the templates.monospaceLinks option to true in your conf.json. +If you want @links to be rendered in normal text if they are links to external URLs (http, ftp) and in monospace otherwise, set the templates.cleverLinks option to true in your . +By default, all @links are rendered in normal font. +See the configuring JSDoc page for more information on setting these. +

+ + +

Examples

+ +{{#example}}Linking modules, externals and events. +/** A module. Refer to it using {@link module:foo/bar}. + * @module foo/bar + */ +/** The built in string object. Refer to it with {@link external:String}. + * @external String + */ +/** An event. Refer to with {@link module:foo/bar.event:MyEvent}. + * @event module:foo/bar.event:MyEvent + */ +{{/example}} + +{{#example}}Using @link +/** See {@link MyClass} and [MyClass's foo property]{@link MyClass#foo}. + * Also check out {@link http://www.google.com|google} and {@link http://github.com Github}. + */ +function myFunction() {} + +/** A class. + * @class */ +function MyClass() { + /** foo property */ + this.foo = 1; +} +{{/example}} + +

+The above produces (except that the first two links actually link to the generated documentation for MyClass and MyClass#foo): +

+See MyClass and MyClass's foo property. +Also check out google and Github. +
+

+ +{{#example}}Example with @linkplain and @linkcode +/** This is a variable {@link FOO}, cleverLinks makes this monospace. + * This is a link to external site {@link http://www.github.com|Github}, not monospace as it's external. + * This is a link to {@linkplain FOO}, but we forced it not to be monospace. + * This is a link to {@linkcode http://www.github.com Github}, but we forced it to be monospace. + * @const + */ +var FOO = 1; +{{/example}} + +

+With the default configuration, this would produce: +

+This is a variable FOO, cleverLinks makes this monospace.
+This is a link to external site Github, not monospace as it's external.
+This is a link to FOO, but we forced it not to be monospace.
+This is a link to Github, but we forced it to be monospace. +
+

+ +

+If templates.cleverLinks was on, it would produce: +

+This is a variable FOO, cleverLinks makes this monospace.
+This is a link to external site Github, not monospace as it's external.
+This is a link to FOO, but we forced it not to be monospace.
+This is a link to Github, but we forced it to be monospace. +
+

+ +

If template.monospaceLinks was on instead, all the links would be monospace except for the @linkplain. +

+ +

See Also

+ + diff --git a/Jake/articles/tags-tutorial b/Jake/articles/tags-tutorial index 0b888ddd..d1ee7c72 100644 --- a/Jake/articles/tags-tutorial +++ b/Jake/articles/tags-tutorial @@ -3,22 +3,45 @@ "out": "tags-tutorial.html", "description": "Insert a link to an included tutorial file." }--> +

Syntax

+

As a block tag:

+@tutorial <tutorialID> + +

As an inline tag:

+{@tutorial <tutorialID>}

Overview

-

+

The @tutorial tag can be used both inline and as a normal tag. +It inserts a link to an included tutorial file. +See the tutorials tutorial for instructions on creating tutorials.

Examples

-

+{{#example}}Using @tutorial in a doclet. +/** Description + * @class + * @tutorial tutorial-1 + * @tutorial tutorial-2 + */ +function MyClass() {} +{{/example}} +

In the above example the MyClass documentation will have links to the tutorials identified by 'tutorial-1' and 'tutorial-2', a bit like the @see tag.

-{{#example}}Example goes here -// todo +{{#example}}Using @tutorial inline. +/** Description. + * Check out {@tutorial tutorial-1} and {@tutorial tutorial-2}. + * @class + */ +function MyClass() {} {{/example}} +

In its in-line usage the @tutorial tag is exactly like @link, but for tutorials.

See Also

\ No newline at end of file +
  • The tutorials tutorial
  • +
  • The @see tag, like @tutorial.
  • +
  • The @link tag, like {@tutorial} but for code objects or URLs.
  • + diff --git a/about-inline-tags.html b/about-inline-tags.html new file mode 100644 index 00000000..34135c1b --- /dev/null +++ b/about-inline-tags.html @@ -0,0 +1,458 @@ + + + + + Use JSDoc: Inline tags + + + + + + + + + + +
    + @use JSDoc +
    + + + +
    +

    Inline tags

    + +

    + Table of Contents +

    +
      +
    1. Links to other symbols + +
        +
      1. @link +
      2. +
      3. Intelligent @link rendering. +
      4. +
      5. @linkplain +
      6. +
      7. @linkcode +
      8. +
      9. Example +
      10. +
      +
    2. +
    3. Links to tutorials, @tutorial +
    4. +
    5. See also +
    6. +
    + +

    +JSDoc has a number of inline tags. +These are different to its normal tags, because they can occur within the content of other tags. +The inline tags mainly provide ways to create links or cross-references to other parts of the documentation. +

    + +

    +@tutorial tags form links to tutorials. +

    +

    +@link tags form links to everything else: external URLs or other JSDoc symbols. +Using the @linkcode tag forces the link's text to be rendered in monospace (useful if you are @link-ing to, say, a constant). Using the @linkplain tag keeps the link's text as-is. +

    +

    +Furthermore, the configuration options template.monospaceLinks and templates.cleverLinks can automatically render @link tags in monospace all the time or when the link is non-external respectively. +

    + + +

    +The @link, @linkcode and @linkplain tags allow links to other documented objects or external URLs to be created within doclets. +

    +

    +You need to use a symbol's full name to have it linked (e.g. {@link MyNamespace.MyClass#property} rather than MyClass#property). +Also, remember that @modules, @externals and @events are prefixed by the tag name (e.g. "module:myModule"). +

    + +
    +
    Linking modules, externals and events.
    +
    +
    +/** A module. Refer to it using {@link module:foo/bar}.
    + * @module foo/bar
    + */
    +/** The built in string object. Refer to it with {@link external:String}.
    + * @external String
    + */
    +/** An event. Refer to with {@link module:foo/bar.event:MyEvent}.
    + * @event module:foo/bar.event:MyEvent
    + */
    +
    +
    +
    +
    +
    +
    Syntax
    +
    +
    +{@link someNamepathOrURL}
    +[link text here]{@link someNamepathOrURL}
    +{@link someNamepathOrURL|link text here}
    +{@link someNamepathOrURL Link text here (after the first space)}
    +
    +
    +
    +

    The {@link ...} tag creates a (HTML) link in the generated output to the specified symbol or URL. +A link text may be provided using the forms specified above. +If it isn't given, then the URL/symbol path is used as the link text. +If the symbol path doesn't exist, then the link is not created (the link text is still shown though). +

    + +
    +
    Using @link
    +
    +
    +/** See {@link MyClass} and [MyClass's foo property]{@link MyClass#foo}.
    + * Also check out {@link http://www.google.com|google} and {@link http://github.com Github}.
    + */
    +function myFunction() {}
    +
    +/** A class.
    + * @class */
    +function MyClass() {
    +    /** foo property */
    +    this.foo = 1;
    +}
    +
    +
    +
    +

    +The above produces (except that the first two links actually link to the generated documentation for MyClass and MyClass#foo): +

    + +

    +See MyClass and MyClass's foo property. +Also check out google and Github. +

    + +

    +By default, {@link ...} just generates HTML <a href="link URL">link text</code>. +It may be of interest to have link texts always rendered in monospace, particularly if it's a link to another code object. For example, you may want "{@link MY_CONSTANT}" to be rendered MY_CONSTANT rather than MY_CONSTANT. +

    + +

    There are a number of ways to deal with this: +

    +

    + + +

    +The configuration options templates.monospaceLinks and templates.cleverLinks can be used to specify how @link captions appear. +

    + +

    +By default both options are switched off. Turn either of them on by modifying your conf.json: +

    +
    +
    conf.json
    +
    +
    +{
    +    ...
    +    "templates": {
    +        // in this example we turn cleverLinks on.
    +        "cleverLinks": true,
    +        "monospaceLinks": false
    +    },
    +    ...
    +}
    +
    +
    +
    +

    +When templates.monospaceLinks is true, all @link tags appear in monospace font. +For example, "{@link asdf}" will become asdf. +Use @linkplain if you want a link to not be monospace. +

    + +

    +When templates.cleverLinks is true, @links to external URLs (http or ftp) appear in normal font, while @links to other symbols (like classes, members, functions) will appear in monospace. +

    + +

    +If both options are true, templates.cleverLinks is used. +

    + +

    The @linkplain tag

    +
    +
    Syntax
    +
    +
    +{@linkplain someNamepathOrURL}
    +[link text here]{@linkplain someNamepathOrURL}
    +{@linkplain someNamepathOrURL|link text here}
    +{@linkplain someNamepathOrURL Link text here (after the first space)}
    +
    +
    +
    +

    +The @linkplain tag is exactly the same as @link, but ensures that the link text is not turned into monospace if you had templates.monospaceLinks or templates.cleverLinks turned on. +

    + +

    +For example, if I turned templates.monospaceLinks on and wrote "{@link fooBar}", it would render fooBar. However, if I write "{@linkplain fooBar}" it will render fooBar. +

    + +

    The @linkcode tag

    +
    +
    Syntax
    +
    +
    +{@linkcode someNamepathOrURL}
    +[link text here]{@linkcode someNamepathOrURL}
    +{@linkcode someNamepathOrURL|link text here}
    +{@linkcode someNamepathOrURL Link text here (after the first space)}
    +
    +
    +
    +

    +The @linkcode tag is exactly the same as @link, but renders the link caption in monospace. +For example, "{@linkcode fooBar}" turns into fooBar. +

    + + +

    +Suppose I had templates.cleverLinks switched on and a file like so: +

    + +
    +
    +
    +
    +/** This is a variable {@link FOO}, cleverLinks makes this monospace.
    + * This is a link to external site {@link http://www.github.com|Github}, not monospace as it's external.
    + * This is a link to {@linkplain FOO}, but we forced it not to be monospace.
    + * This is a link to {@linkcode http://www.github.com Github}, but we forced it to be monospace.
    + * @const
    + */
    +var FOO = 1;
    +
    +
    +
    +

    +will become: +

    + +

    +This is a variable FOO, cleverLinks makes this monospace.
    +This is a link to external site Github, not monospace as it's external.
    +This is a link to FOO, but we forced it not to be monospace.
    +This is a link to Github, but we forced it to be monospace. +

    + +

    +If we had templates.monospaceLinks on instead, all the links would be monospace except for the "{@linkplain FOO}". +If we had both options off (the default), all links would be in normal font except for the "{@linkcode http://www.github.com Github}". +

    + +

    Links to other tutorials (@tutorial)

    +
    +
    Syntax
    +
    +
    +{@tutorial tutorialID}
    +
    +
    +
    +

    +In its in-line usage the @tutorial tag is exactly like @link, but for tutorials (and the link text is always in normal font). +See the tutorials tutorial for more information on setting up tutorials. +The @tutorial tag may also be used in block format; see the @tutorial page for more information. +

    + +
    +
    Using @tutorial inline.
    +
    +
    +/** Description.
    + * Check out {@tutorial tutorial1} and {@tutorial tutorial2}.
    + * @class
    + */
    +
    +
    +
    +

    See Also

    + + +
    + + + + + + diff --git a/about-namepaths.html b/about-namepaths.html index b885d291..738550d9 100644 --- a/about-namepaths.html +++ b/about-namepaths.html @@ -183,12 +183,12 @@

    Namepaths in JSDoc 3

    -
    Basic Syntax Examples of Nameptahs in JSDoc 3
    +
    Basic Syntax Examples of Namepaths in JSDoc 3
     myFunction
     MyConstructor
    -MyConstructor#instancMember
    +MyConstructor#instanceMember
     MyConstructor.staticMember
     MyConstructor~innerMember // note that JSDoc 2 uses a dash
     
    @@ -272,6 +272,31 @@ 

    Namepaths in JSDoc 3

    This chaining can be used with any combination of the connecting symbols: # . ~

    +
    +
    Special cases: modules, externals and events.
    +
    +
    +/** A module. Its name is module:foo/bar.
    + * @module foo/bar
    + */
    +/** The built in string object. Its name is external:String.
    + * @external String
    + */
    +/** An event. Its name is module:foo/bar.event:MyEvent.
    + * @event module:foo/bar.event:MyEvent
    + */
    +
    +
    +
    +

    +There are some special cases with namepaths: @modules are prefixed by "module:", @externals are prefixed by "external:", and @event names are prefixed by "event:". +

    + +

    See Also

    + +
    diff --git a/index.html b/index.html index 6d8e52ac..d0976a7b 100644 --- a/index.html +++ b/index.html @@ -209,6 +209,8 @@

    Getting Started

    Additional longtext tutorials for your code.
    Adding Content to Index.html
    Using Readme files to add content to the default index.html
    +
    Linking using inline tags
    +
    All about inline tags @link, @linkplain, @linkcode, @tutorial.
    All about plugins
    Installing plugins and writing your own.
    Configuring the markdown plugin
    @@ -235,56 +237,59 @@

    Contribute

    JSDoc 3 Tag Dictionary

    -
    @augments
    -
    This object adds onto a parent object.
    @author
    -
    Documents the author of an item.
    @borrows
    -
    This object uses something from another object.
    @classdesc
    -
    Use the following text to describe the entire class.
    @constant
    -
    Document an object as a constant.
    @constructor
    -
    This function is intended to be called with the "new" keyword.
    @constructs
    -
    This function member will be the constructor for the previous class.
    @copyright
    -
    Document some copyright information.
    @default
    -
    Document the default value.
    @deprecated
    -
    Document that this is no longer the preferred way.
    @desc
    -
    Describe the object.
    @enum
    -
    Document a collection of related properties.
    @event
    -
    Document an event.
    @example
    -
    Provide an example of how to use a documented item.
    @exports
    -
    Document the name of a JavaScript module.
    @file
    -
    Describe a file.
    @fires
    -
    Describe the events this method may fire.
    @global
    -
    Document a global object.
    @ignore
    -
    [todo] Remove this from the final output.
    @inner
    -
    [todo] Document an inner object.
    @instance
    -
    [todo] Document an instance member.
    @kind
    -
    [todo] What kind of object is this?
    @license
    -
    [todo] Document the software license that applies to this code.
    @member
    -
    [todo] Document a member.
    @memberof
    -
    [todo] This object is a member or another object.
    @method
    -
    [todo] Describe a method or function.
    @mixes
    -
    [todo] This object mixes in all the members from another object.
    @mixin
    -
    [todo] Document a mix-in object.
    @module
    -
    [todo] Document a JavaScript module.
    @name
    -
    [todo] Document the name of an object.
    @namespace
    -
    [todo] Document a namespace object.
    @param
    -
    >Document the parameter to a function.
    @private
    -
    [todo] This member is meant to be private.
    @property
    -
    Document a property of an object.
    @protected
    -
    [todo] This member is meant to be protected.
    @public
    -
    [todo] This member is meant to be public.
    @readonly
    -
    [todo] This variable is meant to be readonly.
    @requires
    -
    [todo] This JavaScript module requires another JavaScript module.
    @returns
    -
    Document the return value of a function.
    @see
    -
    [todo] Refer to some other documentation for more information.
    @since
    -
    [todo] When was this feature added?
    @summary
    -
    [todo] A shorter version of the full description.
    @this
    -
    [todo] What does the this keyword refer to here?
    @throws
    -
    [todo] Describe what errors could be thrown.
    @todo
    -
    [todo] Document tasks to be completed for an object.
    @tutorial
    +
    Inline tags
    +
    All about inline tags {@link ...}, {@linkplain ...}, {@linkcode ...}, {@tutorial ...}.
    +
    @module
    +
    [todo] Document a JavaScript module.
    @deprecated
    +
    Document that this is no longer the preferred way.
    @mixes
    +
    [todo] This object mixes in all the members from another object.
    @augments
    +
    This object adds onto a parent object.
    @this
    +
    [todo] What does the this keyword refer to here?
    @constant
    +
    Document an object as a constant.
    @desc
    +
    Describe the object.
    @method
    +
    [todo] Describe a method or function.
    @namespace
    +
    [todo] Document a namespace object.
    @todo
    +
    [todo] Document tasks to be completed for an object.
    @enum
    +
    Document a collection of related properties.
    @protected
    +
    [todo] This member is meant to be protected.
    @since
    +
    [todo] When was this feature added?
    @copyright
    +
    Document some copyright information.
    @global
    +
    Document a global object.
    @license
    +
    [todo] Document the software license that applies to this code.
    @readonly
    +
    [todo] This variable is meant to be readonly.
    @summary
    +
    [todo] A shorter version of the full description.
    @constructs
    +
    This function member will be the constructor for the previous class.
    @property
    +
    Document a property of an object.
    @public
    +
    [todo] This member is meant to be public.
    @see
    +
    [todo] Refer to some other documentation for more information.
    @returns
    +
    Document the return value of a function.
    @throws
    +
    [todo] Describe what errors could be thrown.
    @param
    +
    >Document the parameter to a function.
    @typedef
    +
    [todo] Document a custom type.
    @inner
    +
    [todo] Document an inner object.
    @name
    +
    [todo] Document the name of an object.
    @ignore
    +
    [todo] Remove this from the final output.
    @exports
    +
    Document the name of a JavaScript module.
    @example
    +
    Provide an example of how to use a documented item.
    @file
    +
    Describe a file.
    @borrows
    +
    This object uses something from another object.
    @member
    +
    [todo] Document a member.
    @tutorial
    Insert a link to an included tutorial file.
    @type
    -
    [todo] Document the type of an object.
    @typedef
    -
    [todo] Document a custom type.
    @version
    -
    Documents the version number of an item.
    +
    [todo] Document the type of an object.
    @memberof
    +
    [todo] This object is a member or another object.
    @instance
    +
    [todo] Document an instance member.
    @kind
    +
    [todo] What kind of object is this?
    @version
    +
    Documents the version number of an item.
    @constructor
    +
    This function is intended to be called with the "new" keyword.
    @link
    +
    [IN PROGRESS] Inline tag - create a link.
    @fires
    +
    Describe the events this method may fire.
    @event
    +
    Document an event.
    @private
    +
    [todo] This member is meant to be private.
    @author
    +
    Documents the author of an item.
    @default
    +
    Document the default value.
    @classdesc
    +
    Use the following text to describe the entire class.
    @requires
    +
    [todo] This JavaScript module requires another JavaScript module.
    @mixin
    +
    [todo] Document a mix-in object.

    diff --git a/tags-link.html b/tags-link.html new file mode 100644 index 00000000..fb896d9f --- /dev/null +++ b/tags-link.html @@ -0,0 +1,334 @@ + + + + + Use JSDoc: @link + + + + + + + + + + +

    + @use JSDoc +
    + + + +
    +

    @link

    + +

    Syntax

    + +{@link someSymbol}
    +{@link http://some.url.com}
    +[caption here]{@link someSymbol}
    +[caption here]{@link http://some.url.com}
    +{@link someSymbol|caption here}
    +{@link http://some.url.com|caption here}
    +{@link http://some.url.com Caption Here (after the first space)}
    +{@link someSymbol Caption Here (after the first space)} +
    +

    +The following work in the same way as @link but render in monospace or normal font respectively: +

    + +{@linkcode ...}
    +{@linkplain ...} +
    + +

    Overview

    +

    +The @link, @linkcode and @linkplain tags allow links to other documented objects or external URLs to be created within doclets (i.e., within the content of other tags). +

    + +

    +You need to use a symbol's full name to have it linked (e.g. {@link MyNamespace.MyClass#property} rather than MyClass#property). +Also, remember that @modules, @externals and @events are prefixed by the tag name (e.g. "module:myModule"). +

    + +

    The {@link ...} tag creates a (HTML) link in the generated output to the specified symbol or URL. +A link caption different to the link itself may be provided using the syntax specified above. +If the linked object doesn't exist, then the output is kept as text rather than turned into a link. +

    + +

    +By default, {@link ...} just generates the HTML <a href="link URL">link text</code>. +It may be of interest to have link texts always rendered in monospace, particularly if it's a link to another code object. For example, you may want "{@link MY_CONSTANT}" to be rendered MY_CONSTANT rather than MY_CONSTANT. +

    + +

    +To achieve this one can use @linkcode. It is exactly the same as @link, but renders the link caption in monospace. +For example, "{@linkcode fooBar}" turns into fooBar. +

    + +

    +The @linkplain tag is opposite to @linkcode; it ensures that the link text is kept as-is, i.e. not turned into monospace. +

    + +

    +If you want all @links to be rendered in monospace by default, you can set the templates.monospaceLinks option to true in your conf.json. +If you want @links to be rendered in normal text if they are links to external URLs (http, ftp) and in monospace otherwise, set the templates.cleverLinks option to true in your . +By default, all @links are rendered in normal font. +See the configuring JSDoc page for more information on setting these. +

    + + +

    Examples

    + +
    +
    Linking modules, externals and events.
    +
    +
    +/** A module. Refer to it using {@link module:foo/bar}.
    + * @module foo/bar
    + */
    +/** The built in string object. Refer to it with {@link external:String}.
    + * @external String
    + */
    +/** An event. Refer to with {@link module:foo/bar.event:MyEvent}.
    + * @event module:foo/bar.event:MyEvent
    + */
    +
    +
    +
    +
    +
    Using @link
    +
    +
    +/** See {@link MyClass} and [MyClass's foo property]{@link MyClass#foo}.
    + * Also check out {@link http://www.google.com|google} and {@link http://github.com Github}.
    + */
    +function myFunction() {}
    +
    +/** A class.
    + * @class */
    +function MyClass() {
    +    /** foo property */
    +    this.foo = 1;
    +}
    +
    +
    +
    +

    +The above produces (except that the first two links actually link to the generated documentation for MyClass and MyClass#foo): +

    +See MyClass and MyClass's foo property. +Also check out google and Github. +
    +

    + +
    +
    Example with @linkplain and @linkcode
    +
    +
    +/** This is a variable {@link FOO}, cleverLinks makes this monospace.
    + * This is a link to external site {@link http://www.github.com|Github}, not monospace as it's external.
    + * This is a link to {@linkplain FOO}, but we forced it not to be monospace.
    + * This is a link to {@linkcode http://www.github.com Github}, but we forced it to be monospace.
    + * @const
    + */
    +var FOO = 1;
    +
    +
    +
    +

    +With the default configuration, this would produce: +

    +This is a variable FOO, cleverLinks makes this monospace.
    +This is a link to external site Github, not monospace as it's external.
    +This is a link to FOO, but we forced it not to be monospace.
    +This is a link to Github, but we forced it to be monospace. +
    +

    + +

    +If templates.cleverLinks was on, it would produce: +

    +This is a variable FOO, cleverLinks makes this monospace.
    +This is a link to external site Github, not monospace as it's external.
    +This is a link to FOO, but we forced it not to be monospace.
    +This is a link to Github, but we forced it to be monospace. +
    +

    + +

    If template.monospaceLinks was on instead, all the links would be monospace except for the @linkplain. +

    + +

    See Also

    + + + +
    + + + + + + diff --git a/tags-tutorial.html b/tags-tutorial.html index f2b8f8c5..439d30cc 100644 --- a/tags-tutorial.html +++ b/tags-tutorial.html @@ -176,29 +176,59 @@

    @tutorial

    +

    Syntax

    +

    As a block tag:

    +@tutorial <tutorialID> + +

    As an inline tag:

    +{@tutorial <tutorialID>}

    Overview

    -

    +

    The @tutorial tag can be used both inline and as a normal tag. +It inserts a link to an included tutorial file. +See the tutorials tutorial for instructions on creating tutorials.

    Examples

    -

    +

    +
    Using @tutorial in a doclet.
    +
    +
    +/** Description
    + * @class
    + * @tutorial tutorial-1
    + * @tutorial tutorial-2
    + */
    +function MyClass() {}
    +
    +
    +
    +

    In the above example the MyClass documentation will have links to the tutorials identified by 'tutorial-1' and 'tutorial-2', a bit like the @see tag.

    -
    Example goes here
    +
    Using @tutorial inline.
    -// todo
    +/** Description.
    + * Check out {@tutorial tutorial-1} and {@tutorial tutorial-2}.
    + * @class
    + */
    +function MyClass() {}
     
     
    -

    See Also

    +

    In its in-line usage the @tutorial tag is exactly like @link, but for tutorials.

    + +

    See Also

    +
  • The tutorials tutorial
  • +
  • The @see tag, like @tutorial.
  • +
  • The @link tag, like {@tutorial} but for code objects or URLs.
  • + +