File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -516,6 +516,9 @@ impl RustwideBuilder {
516
516
. unwrap_or_default ( ) ,
517
517
)
518
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" )
519
522
. args ( & cargo_args)
520
523
. run ( )
521
524
. is_ok ( )
Original file line number Diff line number Diff line change @@ -28,6 +28,12 @@ <h1 id="crate-title">About Docs.rs</h1>
28
28
{%- endif -%}
29
29
</ p >
30
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
+
31
37
< p >
32
38
The source code of Docs.rs is available on
33
39
< a href ="{{ docsrs_repo }} "> GitHub</ a > . If
You can’t perform that action at this time.
0 commit comments