@@ -203,3 +203,31 @@ These features are enabled by passing a command-line flag to Rustdoc, but the fl
203
203
themselves marked as unstable. To use any of these options, pass ` -Z unstable-options ` as well as
204
204
the flag in question to Rustdoc on the command-line. To do this from Cargo, you can either use the
205
205
` RUSTDOCFLAGS ` environment variable or the ` cargo rustdoc ` command.
206
+
207
+ ### ` --markdown-before-content ` : include rendered Markdown before the content
208
+
209
+ Using this flag looks like this:
210
+
211
+ ``` bash
212
+ $ rustdoc src/lib.rs -Z unstable-options --markdown-before-content extra.md
213
+ $ rustdoc README.md -Z unstable-options --markdown-before-content extra.md
214
+ ```
215
+
216
+ Just like ` --html-before-content ` , this allows you to insert extra content inside the ` <body> ` tag
217
+ but before the other content ` rustdoc ` would normally produce in the rendered documentation.
218
+ However, instead of directly inserting the file verbatim, ` rustdoc ` will pass the files through a
219
+ Markdown renderer before inserting the result into the file.
220
+
221
+ ### ` --markdown-after-content ` : include rendered Markdown after the content
222
+
223
+ Using this flag looks like this:
224
+
225
+ ``` bash
226
+ $ rustdoc src/lib.rs -Z unstable-options --markdown-after-content extra.md
227
+ $ rustdoc README.md -Z unstable-options --markdown-after-content extra.md
228
+ ```
229
+
230
+ Just like ` --html-after-content ` , this allows you to insert extra content before the ` </body> ` tag
231
+ but after the other content ` rustdoc ` would normally produce in the rendered documentation.
232
+ However, instead of directly inserting the file verbatim, ` rustdoc ` will pass the files through a
233
+ Markdown renderer before inserting the result into the file.
0 commit comments