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 116821eCopy full SHA for 116821e
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
@@ -28,6 +28,12 @@ <h1 id="crate-title">About Docs.rs</h1>
28
{%- endif -%}
29
</p>
30
31
+ <p>
32
+ Docs.rs builds crates with environment variable <code>DOCS_RS</code> set to
33
+ <code>1</code>, which enables the crate to detect docs.rs and build the
34
+ crate differently for docs.
35
+ </p>
36
+
37
<p>
38
The source code of Docs.rs is available on
39
<a href="{{ docsrs_repo }}">GitHub</a>. If
0 commit comments