Skip to content

Commit 373a6f8

Browse files
authored
Add anchor links to headers (#1271)
* Add anchor links to about page
2 parents 66fa7c8 + 0e8f4da commit 373a6f8

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

templates/core/about/builds.html

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ <h1>Builds</h1>
1919
{%- endif -%}
2020
</p>
2121

22-
<h3 id="notes-on-docsrs">Notes on using Docs.rs</h3>
22+
<h3 id="notes-on-docsrs"> <a href="#notes-on-docsrs">Notes on using Docs.rs</a> </h3>
2323

24-
<h4 id="setting-a-readme">Setting a README</h4>
24+
<h4 id="setting-a-readme"> <a href="#setting-a-readme">Setting a README</a> </h4>
2525
<p>
2626
The README of a crate is taken from the <code>readme</code> field defined in
2727
<code>Cargo.toml</code>. If this field is not set, no README will be displayed.
2828
</p>
2929

30-
<h4 id="detecting-docsrs">Detecting Docs.rs</h4>
30+
<h4 id="detecting-docsrs"> <a href="#detecting-docsrs">Detecting Docs.rs</a> </h4>
3131
<p>
3232
To recognize Docs.rs from <code>build.rs</code> files, you can test for the environment variable <code>DOCS_RS</code>, e.g.:
3333
{% filter dedent(levels=4) -%}
@@ -42,7 +42,7 @@ <h4 id="detecting-docsrs">Detecting Docs.rs</h4>
4242
This approach can be helpful if you need dependencies for building the library, but not for building the documentation.
4343
</p>
4444

45-
<h4 id="cross-compiling">Cross-compiling</h4>
45+
<h4 id="cross-compiling"> <a href="#cross-compiling">Cross-compiling</a> </h4>
4646
<p>
4747
All targets other than <code>x86_64-unknown-linux-gnu</code> are cross-compiled. For implementation reasons, this is unlikely to change for the foreseeable future.
4848
</p>
@@ -61,32 +61,32 @@ <h4 id="cross-compiling">Cross-compiling</h4>
6161
This approach is also useful for setting <a href="https://doc.rust-lang.org/cargo/reference/features.html">cargo features</a>.
6262
</p>
6363

64-
<h4 id="testing-builds-locally">Testing documentation builds locally</h4>
64+
<h4 id="testing-builds-locally"> <a href="#testing-builds-locally">Testing documentation builds locally</a> </h4>
6565
{%- set build_subcommand = docsrs_repo ~ "/blob/master/README.md#build-subcommand" -%}
6666
<p>
6767
The Docs.rs <a href="{{ build_subcommand | safe }}">README</a> describes how to build
6868
unpublished crate documentation locally using the same build environment as the Docs.rs build agent.
6969
</p>
7070

71-
<h3 id="diagnosing-failed-builds">Diagnosing failed builds</h3>
71+
<h3 id="diagnosing-failed-builds"> <a href="#diagnosing-failed-builds">Diagnosing failed builds</a> </h3>
7272

73-
<h4 id="missing-dependencies">Missing dependencies</h4>
73+
<h4 id="missing-dependencies"> <a href="#missing-dependencies">Missing dependencies</a> </h4>
7474
<p>
7575
Missing dependencies are a common reason for failed builds.
7676
Docs.rs dependencies are managed through
7777
<a href="https://github.com/rust-lang/crates-build-env">crates-build-env</a>.
7878
See <a href="https://forge.rust-lang.org/docs-rs/add-dependencies.html">Forge</a> for how to add a dependency.
7979
</p>
8080

81-
<h4 id="read-only-directories">Write attempt on read-only directories</h4>
81+
<h4 id="read-only-directories"> <a href="#read-only-directories">Write attempt on read-only directories</a> </h4>
8282
<p>
8383
Most of the sandbox is a read-only file system, including the source directory of your crate and its dependencies.
8484
If your <code>build.rs</code> generates files that are relevant for documentation, consider writing to the
8585
<a href="https://doc.rust-lang.org/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-crates">cargo output directory</a>,
8686
passed in the environment variable <code>OUT_DIR</code>.
8787
</p>
8888

89-
<h4 id="hitting-resource-limits">Hitting resource limits</h4>
89+
<h4 id="hitting-resource-limits"> <a href="#hitting-resource-limits">Hitting resource limits</a> </h4>
9090
<p>
9191
All the builds are executed inside a sandbox with limited resources. The current limits are:
9292
</p>
@@ -104,7 +104,7 @@ <h4 id="hitting-resource-limits">Hitting resource limits</h4>
104104
</ul>
105105
</p>
106106

107-
<h4 id="failures-and-rebuilds">Other failures and requesting rebuilds</h4>
107+
<h4 id="failures-and-rebuilds"> <a href="#failures-and-rebuilds">Other failures and requesting rebuilds</a> </h4>
108108
<p>
109109
If your crate fails to build for a reason not listed here, please <a href="{{ docsrs_repo | safe }}/issues">file an issue</a>.
110110
Some build failures can be fixed by Docs.rs, e.g., by issuing a rebuild after a bug in Docs.rs has been fixed.

templates/core/about/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,18 @@ <h1 id="crate-title">About Docs.rs</h1>
2525
</p>
2626

2727

28-
<h2 id="more-about-docsrs">More about Docs.rs</h2>
28+
<h2 id="more-about-docsrs"> <a href="#more-about-docsrs">More about Docs.rs</a> </h2>
2929
<ol>
3030
<li><a href="/about/badges">Badges</a>: How to use badges generated by Docs.rs</li>
3131
<li><a href="/about/builds">Builds</a>: How Docs.rs builds documentation for a crate</li>
3232
<li><a href="/about/metadata">Metadata</a>: How you can configure a build</li>
3333
<li><a href="/about/redirections">Redirections</a>: How Docs.rs uses semantic versioning in URLs</li>
3434
</ol>
3535

36-
<h3 id="version">Version</h3>
36+
<h3 id="version"> <a href="#version">Version</a> </h3>
3737
<p>Currently running Docs.rs version is: <strong>{{ docsrs_version() }}</strong></p>
3838

39-
<h3 id="contact">Contact</h3>
39+
<h3 id="contact"> <a href="#contact">Contact</a> </h3>
4040
{%- set governance_link = "https://www.rust-lang.org/governance/teams/dev-tools#docs-rs" -%}
4141
<p>
4242
Docs.rs is run and maintained by the <a href="{{ governance_link | safe }}">Docs.rs team</a>.

0 commit comments

Comments
 (0)