about summary refs log tree commit diff
path: root/src/doc/rustdoc
diff options
context:
space:
mode:
authorQuietMisdreavus <grey@quietmisdreavus.net>2018-03-15 12:47:26 -0500
committerQuietMisdreavus <grey@quietmisdreavus.net>2018-03-15 12:47:26 -0500
commitbb328237fc68fcc9c0495b283da74f8ec361b371 (patch)
tree8dfc268bf80dd3e491d169690847f0642ecd6e81 /src/doc/rustdoc
parent43ed37711e98585178cc291283b9b3345448f311 (diff)
downloadrust-bb328237fc68fcc9c0495b283da74f8ec361b371.tar.gz
rust-bb328237fc68fcc9c0495b283da74f8ec361b371.zip
talk about --markdown-(before|after)-content
Diffstat (limited to 'src/doc/rustdoc')
-rw-r--r--src/doc/rustdoc/src/unstable-features.md28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/doc/rustdoc/src/unstable-features.md b/src/doc/rustdoc/src/unstable-features.md
index 837a55f371f..873aebfc777 100644
--- a/src/doc/rustdoc/src/unstable-features.md
+++ b/src/doc/rustdoc/src/unstable-features.md
@@ -203,3 +203,31 @@ These features are enabled by passing a command-line flag to Rustdoc, but the fl
 themselves marked as unstable. To use any of these options, pass `-Z unstable-options` as well as
 the flag in question to Rustdoc on the command-line. To do this from Cargo, you can either use the
 `RUSTDOCFLAGS` environment variable or the `cargo rustdoc` command.
+
+### `--markdown-before-content`: include rendered Markdown before the content
+
+Using this flag looks like this:
+
+```bash
+$ rustdoc src/lib.rs -Z unstable-options --markdown-before-content extra.md
+$ rustdoc README.md -Z unstable-options --markdown-before-content extra.md
+```
+
+Just like `--html-before-content`, this allows you to insert extra content inside the `<body>` tag
+but before the other content `rustdoc` would normally produce in the rendered documentation.
+However, instead of directly inserting the file verbatim, `rustdoc` will pass the files through a
+Markdown renderer before inserting the result into the file.
+
+### `--markdown-after-content`: include rendered Markdown after the content
+
+Using this flag looks like this:
+
+```bash
+$ rustdoc src/lib.rs -Z unstable-options --markdown-after-content extra.md
+$ rustdoc README.md -Z unstable-options --markdown-after-content extra.md
+```
+
+Just like `--html-after-content`, this allows you to insert extra content before the `</body>` tag
+but after the other content `rustdoc` would normally produce in the rendered documentation.
+However, instead of directly inserting the file verbatim, `rustdoc` will pass the files through a
+Markdown renderer before inserting the result into the file.