Skip to content

Commit 2665e44

Browse files
authored
A few minor documentation updates (#3641)
1 parent 69ca6a8 commit 2665e44

File tree

3 files changed

+46
-21
lines changed

3 files changed

+46
-21
lines changed

README.md

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@ For issues/details related to the hosted Dart SDK API docs, see
1414

1515
## Installation
1616

17-
The [`dart`](https://dart.dev/tools/dart-tool) tool,
18-
with the `dart doc` command, is part of the [Dart SDK](https://dart.dev/get-dart).
17+
The [`dart`][] tool, with the [`dart doc`][] command,
18+
is part of the [Dart SDK][].
19+
20+
[`dart`]: https://dart.dev/tools/dart-tool
21+
[`dart doc`]: https://dart.dev/tools/dart-doc
22+
[Dart SDK]: https://dart.dev/get-dart
1923

2024
## Generating docs
2125

@@ -39,26 +43,31 @@ Documented 1 public library in 17.9 seconds
3943
Success! Docs generated into <path to dartdoc>/doc/api
4044
```
4145

42-
By default, the documentation is generated to the `doc/api` directory as static
43-
HTML files.
46+
By default, the documentation is generated to the `doc/api` directory as
47+
static HTML files.
48+
49+
To view the generated documentation, you must load them with an HTTP server.
50+
To learn more, follow the [Viewing docs](#viewing-docs) guide.
4451

4552
Run `dart help doc` to see the available command-line options.
4653

4754
## Viewing docs
4855

49-
You can view the generated docs directly from the file system, but if you want
50-
to use the search function, you must load them with an HTTP server.
56+
To enable navigation and search, the generated docs must be
57+
served with an HTTP server.
5158

52-
An easy way to run an HTTP server locally is to use the `dhttpd` package. For
53-
example:
59+
An easy way to run an HTTP server locally is to use [`package:dhttpd`][].
60+
For example:
5461

5562
```
5663
$ dart pub global activate dhttpd
57-
$ dhttpd --path doc/api
64+
$ dart pub global run dhttpd --path doc/api
5865
```
5966

60-
Navigate to `http://localhost:8080` in your browser; the search function should
61-
now work.
67+
To then read the generated docs in your browser,
68+
open the link that `dhttpd` outputs, usually `http://localhost:8080`.
69+
70+
[`package:dhttpd`]: https://pub.dev/packages/dhttpd
6271

6372
## Link structure
6473

@@ -83,16 +92,18 @@ File names are _case-sensitive_.
8392

8493
## Writing docs
8594

86-
Check out the
87-
[Effective Dart: Documentation guide](https://dart.dev/guides/language/effective-dart/documentation).
95+
To learn about writing documentation comments,
96+
check out the [Effective Dart: Documentation guide][].
8897

8998
The guide covers formatting, linking, markup, and general best practices when
90-
authoring doc comments for Dart with `dartdoc`.
99+
authoring doc comments for Dart with `dart doc`.
100+
101+
[Effective Dart: Documentation guide]: https://dart.dev/effective-dart/documentation
91102

92103
## Excluding from documentation
93104

94-
`dart doc` will not generate documentation for a Dart element and its children that have the
95-
`@nodoc` tag in the documentation comment.
105+
`dart doc` will not generate documentation for a Dart element and
106+
its children that have the `@nodoc` tag in the documentation comment.
96107

97108
## Advanced features
98109

@@ -501,7 +512,7 @@ Please see the [dartdoc license][].
501512
Generated docs include:
502513

503514
* Highlight.js -
504-
[LICENSE](https://github.com/isagalaev/highlight.js/blob/main/LICENSE)
515+
[LICENSE](https://github.com/highlightjs/highlight.js/blob/main/LICENSE)
505516
* With `github.css` (c) Vasily Polovnyov <[email protected]>
506517

507518
[GitHub Issue Tracker]: https://github.com/dart-lang/dartdoc/issues

doc/directives.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ The supported directives are listed below:
1111

1212
## `@nodoc` - Do not include documentation
1313

14-
An element whose doc comment should not appear in the generated documenation can
15-
include the `@nodoc` directive.
14+
An element whose doc comment should not appear in the generated documentation
15+
can include the `@nodoc` directive.
1616

1717
Note that the `@nodoc` directive does not have curly braces, like most of the
1818
other directives.

lib/resources/readme.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
1-
# highlight.js
1+
# Dart documentation generator
22

3-
Generated from https://highlightjs.org/download/ on 2021-07-13
3+
This directory includes static sources used by the Dart documentation generator
4+
through the `dart doc` command.
5+
6+
To learn more about generating and viewing the generated documentation,
7+
check out the [`dart doc` documentation][].
8+
9+
[`dart doc` documentation]: https://dart.dev/tools/dart-doc
10+
11+
## Third-party resources
12+
13+
## highlight.js
14+
15+
Generated from https://highlightjs.org/download/ on 2021-07-13.
16+
17+
**License:** https://github.com/highlightjs/highlight.js/blob/main/LICENSE
418

519
**Included languages:**
620

0 commit comments

Comments
 (0)