Skip to content

Commit a378924

Browse files
committed
clean up the getting started page (#123)
1 parent ec40fd1 commit a378924

File tree

2 files changed

+57
-40
lines changed

2 files changed

+57
-40
lines changed

about-getting-started.html

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -25,43 +25,44 @@ <h1>Getting Started with JSDoc 3</h1>
2525
<h2>Table of Contents</h2>
2626
<ul>
2727
<li>
28-
<a href="#getting-started">Getting Started</a>
28+
<a href="#getting-started">Getting started</a>
2929
</li>
3030
<li>
31-
<a href="#adding-documentation-comments-to-your-code">Adding Documentation Comments to Your Code</a>
31+
<a href="#adding-documentation-comments-to-your-code">Adding documentation comments to your code</a>
3232
</li>
3333
<li>
34-
<a href="#generating-a-website">Generating A Website</a>
34+
<a href="#generating-a-website">Generating a website</a>
3535
</li>
3636
</ul>
37-
<h2 id="getting-started">Getting Started</h2>
38-
<p>JSDoc 3 is an API documentation generator for JavaScript, similar to JavaDoc or PHPDoc. You add documentation comments directly to your source code, right along
39-
side the code itself. The JSDoc Tool will scan your source code, and generate a complete HTML documentation website for you.</p>
40-
<h2 id="adding-documentation-comments-to-your-code">Adding Documentation Comments to Your Code</h2>
41-
<p>JSDoc&#39;s purpose is to document the API of your JavaScript application or library. It is assumed that you will want to document things like: namespaces, classes,
42-
methods, method parameters, etc.</p>
43-
<p>JSDoc comments should generally be placed immediately before the code being documented. It must start with a <code>/**</code> sequence in order to be recognized
44-
by the JSDoc parser. Comments beginning with <code>/*</code>, <code>/***</code>, or more than 3 stars will be ignored. This is a feature to allow you to suppress
45-
parsing of comment blocks.</p>
37+
<h2 id="getting-started">Getting started</h2>
38+
<p>JSDoc 3 is an API documentation generator for JavaScript, similar to Javadoc or phpDocumentor. You add documentation comments directly to your source code, right
39+
alongside the code itself. The JSDoc tool will scan your source code and generate an HTML documentation website for you.</p>
40+
<h2 id="adding-documentation-comments-to-your-code">Adding documentation comments to your code</h2>
41+
<p>JSDoc&#39;s purpose is to document the API of your JavaScript application or library. It is assumed that you will want to document things like modules, namespaces,
42+
classes, methods, method parameters, and so on.</p>
43+
<p>JSDoc comments should generally be placed immediately before the code being documented. Each comment must start with a <code>/**</code> sequence in order to
44+
be recognized by the JSDoc parser. Comments beginning with <code>/*</code>, <code>/***</code>, or more than 3 stars will be ignored. This is a feature to allow
45+
you to suppress parsing of comment blocks.</p>
4646
<figure>
47-
<figcaption>The simplest documentation is just a description.</figcaption><pre class="prettyprint lang-js"><code>/** This is a description of the foo function. */
47+
<figcaption>The simplest documentation is just a description</figcaption><pre class="prettyprint lang-js"><code>/** This is a description of the foo function. */
4848
function foo() {
4949
}
5050
</code></pre>
5151
</figure>
52-
<p>Adding a description is simple, just type the description you want in the documentaton comment.</p>
53-
<p>Special &quot;documentation tags&quot; can be used to give more information. For example, if the function is a constructor, you can indicate this by adding a
54-
tag.</p>
52+
<p>Adding a description is simplejust type the description you want in the documentation comment.</p>
53+
<p>Special &quot;JSDoc tags&quot; can be used to give more information. For example, if the function is a constructor for a class, you can indicate this by adding
54+
a <code>@constructor</code> tag.</p>
5555
<figure>
56-
<figcaption>Use a documentation tag to describe your code.</figcaption><pre class="prettyprint lang-js"><code>/**
56+
<figcaption>Use a JSDoc tag to describe your code</figcaption><pre class="prettyprint lang-js"><code>/**
5757
* Represents a book.
5858
* @constructor
5959
*/
6060
function Book(title, author) {
6161
}
6262
</code></pre>
6363
</figure>
64-
<p>More tags can be used to add more information. See the Tag Dictionary for a complete list of tags that are recognized by JSDoc 3.</p>
64+
<p>More tags can be used to add more information. See the <a href="index.html#block-tags">home page</a> for a complete list of tags that are recognized by JSDoc
65+
3.</p>
6566
<figure>
6667
<figcaption>Adding more information with tags</figcaption><pre class="prettyprint lang-js"><code>/**
6768
* Represents a book.
@@ -73,15 +74,16 @@ <h2 id="adding-documentation-comments-to-your-code">Adding Documentation Comment
7374
}
7475
</code></pre>
7576
</figure>
76-
<h2 id="generating-a-website">Generating A Website</h2>
77-
<p>Once your code is commented, you can use the JSDoc 3 Tool to generate an HTML website from the source.</p>
78-
<p>By default, JSDoc will use the &quot;default&quot; template to turn the documentation data into HTML. You can edit this template to suit your own needs, or create
79-
an entirely new template if that is what you prefer.</p>
77+
<h2 id="generating-a-website">Generating a website</h2>
78+
<p>Once your code is commented, you can use the JSDoc 3 tool to generate an HTML website from your source files.</p>
79+
<p>By default, JSDoc uses the built-in &quot;default&quot; template to turn the documentation into HTML. You can edit this template to suit your own needs or create
80+
an entirely new template if that is what you prefer.
81+
</p>
8082
<figure>
81-
<figcaption>Running the documentation generator on the command line.</figcaption><pre class="prettyprint"><code>./jsdoc book.js
83+
<figcaption>Running the documentation generator on the command line</figcaption><pre class="prettyprint"><code>jsdoc book.js
8284
</code></pre>
8385
</figure>
84-
<p>This command will create a folder named &quot;out&quot; in the current working directory. Within that you will find the generated HTML pages.</p>
86+
<p>This command will create a directory named <code>out/</code> in the current working directory. Within that directory, you will find the generated HTML pages.</p>
8587
</article>
8688
<footer>
8789
<a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/">

content/en/about-getting-started.md

Lines changed: 31 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,24 @@ title: Getting Started with JSDoc 3
33
description: A quick-start to documenting JavaScript with JSDoc.
44
---
55

6-
## Getting Started
6+
## Getting started
77

8-
JSDoc 3 is an API documentation generator for JavaScript, similar to JavaDoc or PHPDoc. You add documentation comments directly to your source code, right along side the code itself. The JSDoc Tool will scan your source code, and generate a complete HTML documentation website for you.
8+
JSDoc 3 is an API documentation generator for JavaScript, similar to Javadoc or phpDocumentor. You
9+
add documentation comments directly to your source code, right alongside the code itself. The JSDoc
10+
tool will scan your source code and generate an HTML documentation website for you.
911

10-
## Adding Documentation Comments to Your Code
12+
## Adding documentation comments to your code
1113

12-
JSDoc's purpose is to document the API of your JavaScript application or library. It is assumed that you will want to document things like: namespaces, classes, methods, method parameters, etc.
14+
JSDoc's purpose is to document the API of your JavaScript application or library. It is assumed that
15+
you will want to document things like modules, namespaces, classes, methods, method parameters, and
16+
so on.
1317

14-
JSDoc comments should generally be placed immediately before the code being documented. It must start with a `/**` sequence in order to be recognized by the JSDoc parser. Comments beginning with `/*`, `/***`, or more than 3 stars will be ignored. This is a feature to allow you to suppress parsing of comment blocks.
18+
JSDoc comments should generally be placed immediately before the code being documented. Each comment
19+
must start with a `/**` sequence in order to be recognized by the JSDoc parser. Comments beginning
20+
with `/*`, `/***`, or more than 3 stars will be ignored. This is a feature to allow you to suppress
21+
parsing of comment blocks.
1522

16-
{% example "The simplest documentation is just a description." %}
23+
{% example "The simplest documentation is just a description" %}
1724

1825
```js
1926
/** This is a description of the foo function. */
@@ -22,11 +29,12 @@ function foo() {
2229
```
2330
{% endexample %}
2431

25-
Adding a description is simple, just type the description you want in the documentaton comment.
32+
Adding a description is simplejust type the description you want in the documentation comment.
2633

27-
Special "documentation tags" can be used to give more information. For example, if the function is a constructor, you can indicate this by adding a tag.
34+
Special "JSDoc tags" can be used to give more information. For example, if the function is a
35+
constructor for a class, you can indicate this by adding a `@constructor` tag.
2836

29-
{% example "Use a documentation tag to describe your code." %}
37+
{% example "Use a JSDoc tag to describe your code" %}
3038

3139
```js
3240
/**
@@ -38,7 +46,8 @@ function Book(title, author) {
3846
```
3947
{% endexample %}
4048

41-
More tags can be used to add more information. See the Tag Dictionary for a complete list of tags that are recognized by JSDoc 3.
49+
More tags can be used to add more information. See the [home page][block-tags] for a complete list
50+
of tags that are recognized by JSDoc 3.
4251

4352
{% example "Adding more information with tags" %}
4453

@@ -54,17 +63,23 @@ function Book(title, author) {
5463
```
5564
{% endexample %}
5665

57-
## Generating A Website
66+
[block-tags]: index.html#block-tags
5867

59-
Once your code is commented, you can use the JSDoc 3 Tool to generate an HTML website from the source.
68+
## Generating a website
6069

61-
By default, JSDoc will use the "default" template to turn the documentation data into HTML. You can edit this template to suit your own needs, or create an entirely new template if that is what you prefer.
70+
Once your code is commented, you can use the JSDoc 3 tool to generate an HTML website from your
71+
source files.
6272

63-
{% example "Running the documentation generator on the command line." %}
73+
By default, JSDoc uses the built-in "default" template to turn the documentation into HTML. You can
74+
edit this template to suit your own needs or create an entirely new template if that is what you
75+
prefer.
76+
77+
{% example "Running the documentation generator on the command line" %}
6478

6579
```
66-
./jsdoc book.js
80+
jsdoc book.js
6781
```
6882
{% endexample %}
6983

70-
This command will create a folder named "out" in the current working directory. Within that you will find the generated HTML pages.
84+
This command will create a directory named `out/` in the current working directory. Within that
85+
directory, you will find the generated HTML pages.

0 commit comments

Comments
 (0)