Description
I run cargo doc
quite a lot because I like to have documents locally. This means I can work without an internet connection; it means docs load very quickly; it means they are the versions I have selected; and it provides better privacy because it means no-one outside my systems is seeing which docs I load when.
However, there is a fly in this ointment: the docs sometimes contain offsite links. For example, my copy of the top-level page for rocket
contains these:
<link rel="shortcut icon" href="https://rocket.rs/v0.4/images/favicon.ico">
<img src='https://rocket.rs/v0.4/images/logo-boxed.png' alt='logo'>
The top-level of rocket_cors
contains these:
<img src="https://travis-ci.org/lawliet89/rocket_cors.svg" alt="Build Status" />
<img src="https://img.shields.io/github/tag/lawliet89/rocket_cors.svg" alt="Repository" />
<img src="https://img.shields.io/crates/v/rocket_cors.svg" alt="Crates.io" />
These are just two examples and I don't mean to criticise these crates. I don't think it would be sensible to try to solve my issue by asking every crate to refrain from using these kind of badges. (Although rocket's favicon and logo could surely be in the crate itself.)
The consequences are: if I don't have an internet connection, these docs don't load properly. (They load eventually but only after an http timeout.) If I do have an internet connection, these references tell shields.io and travis what I am doing, and I would prefer to avoid that.
I think instead that it would be best for there to be a way to ask rustdoc to eliminate all offsite resource inclusions in the generated outputs. This would probably best be done at late in the output stage, so that it is comprehensive.
As a stretch goal it would be nice for offsite links to be marked somehow. Thanks for your attention.