Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/docbuilder/rustwide_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,9 @@ impl RustwideBuilder {
.unwrap_or_default(),
)
.env("RUSTDOCFLAGS", rustdoc_flags.join(" "))
// For docs.rs detection from build script:
// https://github.com/rust-lang/docs.rs/issues/147
.env("DOCS_RS", "1")
.args(&cargo_args)
.run()
.is_ok()
Expand Down
6 changes: 6 additions & 0 deletions tera-templates/core/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ <h1 id="crate-title">About Docs.rs</h1>
{%- endif -%}
</p>

<p>
Docs.rs builds crates with environment variable <code>DOCS_RS</code> set to
`1`, which enables the crate to detect docs.rs and build the
Comment thread
jyn514 marked this conversation as resolved.
Outdated
crate differently for docs.
</p>

<p>
The source code of Docs.rs is available on
<a href="{{ docsrs_repo }}">GitHub</a>. If
Expand Down