Update rustdoc man page
This commit is contained in:
parent
5b13bff520
commit
478544184e
1 changed files with 25 additions and 39 deletions
|
@ -1,4 +1,4 @@
|
||||||
.TH RUSTDOC "1" "September 2016" "rustdoc 1.13.0" "User Commands"
|
.TH RUSTDOC "1" "May 2017" "rustdoc 1.19.0" "User Commands"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
rustdoc \- generate documentation from Rust source code
|
rustdoc \- generate documentation from Rust source code
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
@ -15,14 +15,13 @@ provides several output formats for the generated documentation.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
\fB\-r\fR, \fB\-\-input\-format\fR \fIFORMAT\fR
|
\fB\-r\fR, \fB\-\-input\-format\fR \fIFORMAT\fR
|
||||||
html or json (default: inferred)
|
rust
|
||||||
.TP
|
.TP
|
||||||
\fB\-w\fR, \fB\-\-output\-format\fR \fIFORMAT\fR
|
\fB\-w\fR, \fB\-\-output\-format\fR \fIFORMAT\fR
|
||||||
html or json (default: html)
|
html
|
||||||
.TP
|
.TP
|
||||||
\fB\-o\fR, \fB\-\-output\fR \fIOUTPUT\fR
|
\fB\-o\fR, \fB\-\-output\fR \fIOUTPUT\fR,
|
||||||
where to place the output (default: \fIdoc/\fR for html,
|
where to place the output (default: \fIdoc/\fR for html)
|
||||||
\fIdoc.json\fR for json)
|
|
||||||
.TP
|
.TP
|
||||||
\fB\-\-passes\fR \fILIST\fR
|
\fB\-\-passes\fR \fILIST\fR
|
||||||
space\[hy]separated list of passes to run (default: '')
|
space\[hy]separated list of passes to run (default: '')
|
||||||
|
@ -60,14 +59,25 @@ pass arguments to the test runner
|
||||||
\fB\-\-html\-in\-header\fR \fIFILE\fR
|
\fB\-\-html\-in\-header\fR \fIFILE\fR
|
||||||
file to add to <head>
|
file to add to <head>
|
||||||
.TP
|
.TP
|
||||||
\fB\-\-html\-before\-content\fR \fIFILE\fR
|
\fB\-\-html\-before\-content\fR \fIFILES\fR
|
||||||
file to add in <body>, before content
|
files to include inline between <body> and the content of a rendered Markdown
|
||||||
|
file or generated documentation
|
||||||
.TP
|
.TP
|
||||||
\fB\-\-html\-after\-content\fR \fIFILE\fR
|
\fB\-\-markdown\-before\-content\fR \fIFILES\fR
|
||||||
file to add in <body>, after content
|
files to include inline between <body> and the content of a rendered
|
||||||
|
Markdown file or generated documentation
|
||||||
.TP
|
.TP
|
||||||
\fB\-\-markdown\-css\fR \fIFILE\fR
|
\fB\-\-html\-after\-content\fR \fIFILES\fR
|
||||||
CSS files to include via <link> in a rendered Markdown file
|
files to include inline between the content and </body> of a rendered
|
||||||
|
Markdown file or generated documentation
|
||||||
|
.TP
|
||||||
|
\fB\-\-markdown\-after\-content\fR \fIFILES\fR
|
||||||
|
files to include inline between the content and </body> of a rendered
|
||||||
|
Markdown file or generated documentation
|
||||||
|
.TP
|
||||||
|
\fB\-\-markdown\-css\fR \fIFILES\fR
|
||||||
|
CSS files to include via <link> in a rendered Markdown file Markdown file or
|
||||||
|
generated documentation
|
||||||
.TP
|
.TP
|
||||||
\fB\-\-markdown\-playground\-url\fR \fIURL\fR
|
\fB\-\-markdown\-playground\-url\fR \fIURL\fR
|
||||||
URL to send code snippets to
|
URL to send code snippets to
|
||||||
|
@ -75,40 +85,21 @@ URL to send code snippets to
|
||||||
\fB\-\-markdown\-no\-toc\fR
|
\fB\-\-markdown\-no\-toc\fR
|
||||||
don't include table of contents
|
don't include table of contents
|
||||||
.TP
|
.TP
|
||||||
\fB\-h\fR, \fB\-\-help\fR
|
\fB\-h\fR, \fB\-\-extend\-css\fR
|
||||||
Print help
|
to redefine some css rules with a given file to generate doc with your own theme
|
||||||
.TP
|
.TP
|
||||||
\fB\-V\fR, \fB\-\-version\fR
|
\fB\-V\fR, \fB\-\-version\fR
|
||||||
Print rustdoc's version
|
Print rustdoc's version
|
||||||
|
|
||||||
.SH "OUTPUT FORMATS"
|
.SH "OUTPUT FORMATS"
|
||||||
|
|
||||||
The rustdoc tool can generate output in either an HTML or JSON format.
|
The rustdoc tool can generate output in an HTML format.
|
||||||
|
|
||||||
If using an HTML format, then the specified output destination will be the root
|
If using an HTML format, then the specified output destination will be the root
|
||||||
directory of an HTML structure for all the documentation.
|
directory of an HTML structure for all the documentation.
|
||||||
Pages will be placed into this directory, and source files will also
|
Pages will be placed into this directory, and source files will also
|
||||||
possibly be rendered into it as well.
|
possibly be rendered into it as well.
|
||||||
|
|
||||||
If using a JSON format, then the specified output destination will have the
|
|
||||||
rustdoc output serialized as JSON into it.
|
|
||||||
This output format exists to pre\[hy]compile documentation for crates,
|
|
||||||
and for usage in non\[hy]rustdoc tools.
|
|
||||||
The JSON output is the following hash:
|
|
||||||
|
|
||||||
{
|
|
||||||
"schema": VERSION,
|
|
||||||
"crate": ...,
|
|
||||||
"plugins": ...,
|
|
||||||
}
|
|
||||||
|
|
||||||
The schema version indicates what the structure of crate/plugins will
|
|
||||||
look like.
|
|
||||||
Within a schema version the structure will remain the same.
|
|
||||||
The \fIcrate\fR field will contain all relevant documentation for the
|
|
||||||
source being documented, and the \fIplugins\fR field will contain the
|
|
||||||
output of the plugins run over the crate.
|
|
||||||
|
|
||||||
.SH "EXAMPLES"
|
.SH "EXAMPLES"
|
||||||
|
|
||||||
To generate documentation for the source in the current directory:
|
To generate documentation for the source in the current directory:
|
||||||
|
@ -117,11 +108,6 @@ To generate documentation for the source in the current directory:
|
||||||
List all available passes that rustdoc has, along with default passes:
|
List all available passes that rustdoc has, along with default passes:
|
||||||
$ rustdoc \-\-passes list
|
$ rustdoc \-\-passes list
|
||||||
|
|
||||||
To precompile the documentation for a crate, and then use it to render html at
|
|
||||||
a later date:
|
|
||||||
$ rustdoc \-w json hello.rs
|
|
||||||
$ rustdoc doc.json
|
|
||||||
|
|
||||||
The generated HTML can be viewed with any standard web browser.
|
The generated HTML can be viewed with any standard web browser.
|
||||||
|
|
||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
||||||
|
|
Loading…
Add table
Reference in a new issue