We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
DOCS_RS
1 parent 09b55bc commit 114545eCopy full SHA for 114545e
src/docbuilder/rustwide_builder.rs
@@ -516,6 +516,9 @@ impl RustwideBuilder {
516
.unwrap_or_default(),
517
)
518
.env("RUSTDOCFLAGS", rustdoc_flags.join(" "))
519
+ // For docs.rs detection from build script:
520
+ // https://github.com/rust-lang/docs.rs/issues/147
521
+ .env("DOCS_RS", "1")
522
.args(&cargo_args)
523
.run()
524
.is_ok()
tera-templates/core/about.html
@@ -26,6 +26,10 @@ <h1 id="crate-title">About Docs.rs</h1>
26
<a href="{{ docsrs_repo }}/issues">issues page</a>
27
and file a new issue if you don't see an existing request.
28
{%- endif -%}
29
+
30
+ Docs.rs builds crates with environment variable `DOCS_RS` set to
31
+ `1`, which enables the crate to detect docs.rs and build the
32
+ crate differently for docs.
33
</p>
34
35
<p>
0 commit comments