1
- .TH RUSTDOC "1" "September 2016 " "rustdoc 1.13 .0" "User Commands"
1
+ .TH RUSTDOC "1" "May 2017 " "rustdoc 1.19 .0" "User Commands"
2
2
.SH NAME
3
3
rustdoc \- generate documentation from Rust source code
4
4
.SH SYNOPSIS
@@ -15,14 +15,13 @@ provides several output formats for the generated documentation.
15
15
16
16
.TP
17
17
\fB \- r \fR , \fB \-\- input \- format \fR \fI FORMAT \fR
18
- html or json (default: inferred)
18
+ rust
19
19
.TP
20
20
\fB \- w \fR , \fB \-\- output \- format \fR \fI FORMAT \fR
21
- html or json (default: html)
21
+ html
22
22
.TP
23
- \fB \- o \fR , \fB \-\- output \fR \fI OUTPUT \fR
24
- where to place the output (default: \fI doc/ \fR for html,
25
- \fI doc.json \fR for json)
23
+ \fB \- o \fR , \fB \-\- output \fR \fI OUTPUT \fR ,
24
+ where to place the output (default: \fI doc/ \fR for html)
26
25
.TP
27
26
\fB \-\- passes \fR \fI LIST \fR
28
27
space\[hy ] separated list of passes to run (default: '')
@@ -60,55 +59,47 @@ pass arguments to the test runner
60
59
\fB \-\- html \- in \- header \fR \fI FILE \fR
61
60
file to add to <head>
62
61
.TP
63
- \fB \-\- html \- before \- content \fR \fI FILE \fR
64
- file to add in <body>, before content
62
+ \fB \-\- html \- before \- content \fR \fI FILES \fR
63
+ files to include inline between <body> and the content of a rendered Markdown
64
+ file or generated documentation
65
65
.TP
66
- \fB \-\- html \- after \- content \fR \fI FILE \fR
67
- file to add in <body>, after content
66
+ \fB \-\- markdown \- before \- content \fR \fI FILES \fR
67
+ files to include inline between <body> and the content of a rendered
68
+ Markdown file or generated documentation
68
69
.TP
69
- \fB \-\- markdown \- css \fR \fI FILE \fR
70
- CSS files to include via <link> in a rendered Markdown file
70
+ \fB \-\- html \- after \- content \fR \fI FILES \fR
71
+ files to include inline between the content and </body> of a rendered
72
+ Markdown file or generated documentation
73
+ .TP
74
+ \fB \-\- markdown \- after \- content \fR \fI FILES \fR
75
+ files to include inline between the content and </body> of a rendered
76
+ Markdown file or generated documentation
77
+ .TP
78
+ \fB \-\- markdown \- css \fR \fI FILES \fR
79
+ CSS files to include via <link> in a rendered Markdown file Markdown file or
80
+ generated documentation
71
81
.TP
72
82
\fB \-\- markdown \- playground \- url \fR \fI URL \fR
73
83
URL to send code snippets to
74
84
.TP
75
85
\fB \-\- markdown \- no \- toc \fR
76
86
don't include table of contents
77
87
.TP
78
- \fB \- h \fR , \fB \-\- help \fR
79
- Print help
88
+ \fB \- h \fR , \fB \-\- extend \- css \fR
89
+ to redefine some css rules with a given file to generate doc with your own theme
80
90
.TP
81
91
\fB \- V \fR , \fB \-\- version \fR
82
92
Print rustdoc's version
83
93
84
94
.SH "OUTPUT FORMATS"
85
95
86
- The rustdoc tool can generate output in either an HTML or JSON format.
96
+ The rustdoc tool can generate output in an HTML format.
87
97
88
98
If using an HTML format, then the specified output destination will be the root
89
99
directory of an HTML structure for all the documentation.
90
100
Pages will be placed into this directory, and source files will also
91
101
possibly be rendered into it as well.
92
102
93
- If using a JSON format, then the specified output destination will have the
94
- rustdoc output serialized as JSON into it.
95
- This output format exists to pre\[hy ] compile documentation for crates,
96
- and for usage in non\[hy ] rustdoc tools.
97
- The JSON output is the following hash:
98
-
99
- {
100
- "schema": VERSION,
101
- "crate": ...,
102
- "plugins": ...,
103
- }
104
-
105
- The schema version indicates what the structure of crate/plugins will
106
- look like.
107
- Within a schema version the structure will remain the same.
108
- The \fI crate \fR field will contain all relevant documentation for the
109
- source being documented, and the \fI plugins \fR field will contain the
110
- output of the plugins run over the crate.
111
-
112
103
.SH "EXAMPLES"
113
104
114
105
To generate documentation for the source in the current directory:
@@ -117,11 +108,6 @@ To generate documentation for the source in the current directory:
117
108
List all available passes that rustdoc has, along with default passes:
118
109
$ rustdoc \-\- passes list
119
110
120
- To precompile the documentation for a crate, and then use it to render html at
121
- a later date:
122
- $ rustdoc \- w json hello.rs
123
- $ rustdoc doc.json
124
-
125
111
The generated HTML can be viewed with any standard web browser.
126
112
127
113
.SH "SEE ALSO"
0 commit comments