Skip to content

Commit 643a43c

Browse files
committed
Cleanup whitespace
1 parent 241f527 commit 643a43c

File tree

6 files changed

+240
-241
lines changed

6 files changed

+240
-241
lines changed

templates/about-base.html

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
{% extends "base.html" %}
22

33
{% block header %}
4-
<div class="cratesfyi-package-container">
5-
<div class="container about">
6-
<h3 id="crate-title">Docs.rs documentation</h3>
7-
<div class="pure-menu pure-menu-horizontal">
8-
<ul class="pure-menu-list">
9-
{% set text = '<i class="fa fa-fw fa-info-circle"></i> <span class="title">About</span>' %}
10-
{{ macros::active_link(expected="index", href="/about", text=text) }}
11-
{% set text = '<i class="fa fa-fw fa-fonticons"></i> <span class="title">Badges</span>' %}
12-
{{ macros::active_link(expected="badges", href="/about/badges", text=text) }}
13-
{% set text = '<i class="fa fa-fw fa-cogs"></i> <span class="title">Builds</span>' %}
14-
{{ macros::active_link(expected="builds", href="/about/builds", text=text) }}
15-
{% set text = '<i class="fa fa-fw fa-table"></i> <span class="title">Metadata</span>' %}
16-
{{ macros::active_link(expected="metadata", href="/about/metadata", text=text) }}
17-
{% set text = '<i class="fa fa-fw fa-road"></i> <span class="title">Shorthand URLs</span>' %}
18-
{{ macros::active_link(expected="redirections", href="/about/redirections", text=text) }}
19-
</ul>
4+
<div class="cratesfyi-package-container">
5+
<div class="container about">
6+
<h3 id="crate-title">Docs.rs documentation</h3>
7+
<div class="pure-menu pure-menu-horizontal">
8+
<ul class="pure-menu-list">
9+
{% set text = '<i class="fa fa-fw fa-info-circle"></i> <span class="title">About</span>' %}
10+
{{ macros::active_link(expected="index", href="/about", text=text) }}
11+
{% set text = '<i class="fa fa-fw fa-fonticons"></i> <span class="title">Badges</span>' %}
12+
{{ macros::active_link(expected="badges", href="/about/badges", text=text) }}
13+
{% set text = '<i class="fa fa-fw fa-cogs"></i> <span class="title">Builds</span>' %}
14+
{{ macros::active_link(expected="builds", href="/about/builds", text=text) }}
15+
{% set text = '<i class="fa fa-fw fa-table"></i> <span class="title">Metadata</span>' %}
16+
{{ macros::active_link(expected="metadata", href="/about/metadata", text=text) }}
17+
{% set text = '<i class="fa fa-fw fa-road"></i> <span class="title">Shorthand URLs</span>' %}
18+
{{ macros::active_link(expected="redirections", href="/about/redirections", text=text) }}
19+
</ul>
20+
</div>
21+
</div>
2022
</div>
21-
</div>
22-
</div>
2323
{% endblock %}

templates/core/about/badges.html

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -3,51 +3,51 @@
33
{%- block title -%} Badges {%- endblock title -%}
44

55
{%- block body -%}
6-
<h1>Badges</h1>
7-
8-
<div class="container about">
9-
<p>
10-
You can use badges to show state of your documentation to your users.
11-
The default badge will be pointed at the latest version of a crate.
12-
You can use <code>version</code> parameter to show status of documentation for
13-
any version you want.
14-
</p>
15-
16-
<p>
17-
Badge will display in blue if docs.rs is successfully hosting your crate
18-
documentation, and red if building documentation failing.
19-
</p>
20-
21-
<p>Example badges for mio crate:</p>
22-
<table class="pure-table pure-table-horizontal">
23-
<thead>
24-
<tr>
25-
<th>URL</th>
26-
<th>Badge</th>
27-
</tr>
28-
</thead>
29-
30-
<tbody>
31-
{%- set mio_badge = "https://docs.rs/mio/badge.svg" -%}
32-
<tr>
33-
<td>Latest version: <a href="{{ mio_badge | safe }}">{{ mio_badge }}</a></td>
34-
<td><img src="{{ mio_badge | safe }}" alt="mio" /></td>
35-
</tr>
36-
37-
<tr>
38-
<td>
39-
Version 0.4.4: <a href="{{ mio_badge | safe }}?version=0.4.4">{{ mio_badge }}?version=0.4.4</a>
40-
</td>
41-
<td><img src="{{ mio_badge | safe }}?version=0.4.4" alt="mio" /></td>
42-
</tr>
43-
44-
<tr>
45-
<td>
46-
Version 0.1.0: <a href="{{ mio_badge | safe }}?version=0.1.0">{{ mio_badge }}?version=0.1.0</a>
47-
</td>
48-
<td><img src="{{ mio_badge | safe }}?version=0.1.0" alt="mio" /></td>
49-
</tr>
50-
</tbody>
51-
</table>
52-
</div>
6+
<h1>Badges</h1>
7+
8+
<div class="container about">
9+
<p>
10+
You can use badges to show state of your documentation to your users.
11+
The default badge will be pointed at the latest version of a crate.
12+
You can use <code>version</code> parameter to show status of documentation for
13+
any version you want.
14+
</p>
15+
16+
<p>
17+
Badge will display in blue if docs.rs is successfully hosting your crate
18+
documentation, and red if building documentation failing.
19+
</p>
20+
21+
<p>Example badges for mio crate:</p>
22+
<table class="pure-table pure-table-horizontal">
23+
<thead>
24+
<tr>
25+
<th>URL</th>
26+
<th>Badge</th>
27+
</tr>
28+
</thead>
29+
30+
<tbody>
31+
{%- set mio_badge = "https://docs.rs/mio/badge.svg" -%}
32+
<tr>
33+
<td>Latest version: <a href="{{ mio_badge | safe }}">{{ mio_badge }}</a></td>
34+
<td><img src="{{ mio_badge | safe }}" alt="mio" /></td>
35+
</tr>
36+
37+
<tr>
38+
<td>
39+
Version 0.4.4: <a href="{{ mio_badge | safe }}?version=0.4.4">{{ mio_badge }}?version=0.4.4</a>
40+
</td>
41+
<td><img src="{{ mio_badge | safe }}?version=0.4.4" alt="mio" /></td>
42+
</tr>
43+
44+
<tr>
45+
<td>
46+
Version 0.1.0: <a href="{{ mio_badge | safe }}?version=0.1.0">{{ mio_badge }}?version=0.1.0</a>
47+
</td>
48+
<td><img src="{{ mio_badge | safe }}?version=0.1.0" alt="mio" /></td>
49+
</tr>
50+
</tbody>
51+
</table>
52+
</div>
5353
{%- endblock body %}

templates/core/about/builds.html

Lines changed: 71 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -3,78 +3,77 @@
33
{%- block title -%} Builds {%- endblock title -%}
44

55
{%- block body -%}
6-
{%- set docsrs_repo = "https://github.com/rust-lang/docs.rs" -%}
7-
<h1>Builds</h1>
8-
<div class="container about">
9-
<p>
10-
Docs.rs automatically builds crates' documentation released on
11-
<a href="https://crates.io/">crates.io</a>
12-
using the nightly release of the Rust compiler.
13-
Builds can take a while depending how many crates are in <a href="/releases/queue">the queue</a>.
14-
</p>
15-
16-
<p>
17-
{%- if rustc_version %}
18-
The current version of the Rust compiler in use is <code>{{ rustc_version }}</code>.
19-
{%- endif -%}
20-
</p>
21-
22-
<p>
23-
The README of a crate is taken from the <code>readme</code> field defined in
24-
<code>Cargo.toml</code>. If a crate doesn't have this field,
25-
no README will be displayed.
26-
</p>
27-
28-
<h3>Diagnosing a failed build</h3>
29-
30-
<h4>Missing dependencies</h4>
31-
<p>
32-
Missing dependencies are a common reason for a failed build.
33-
Docs.rs dependencies are managed through
34-
<a href="https://github.com/rust-lang/crates-build-env">crates-build-env</a>;
35-
see <a href="https://forge.rust-lang.org/docs-rs/add-dependencies.html">Forge</a> for instructions
36-
on how to make a PR. You can always <a href="{{ docsrs_repo | safe }}/issues">file an issue</a>
37-
if you're having trouble.
38-
</p>
39-
40-
<h4>Detecting Docs.rs from <code>build.rs</code></h4>
41-
<p>
42-
Docs.rs builds crates with the environment variable <code>DOCS_RS</code> set to
43-
<code>1</code>, which enables the crate to detect docs.rs and build the
44-
crate differently. This can be helpful if you need
45-
dependencies for building the library, but not for building the documentation.
46-
</p>
47-
48-
<h4>Detecting Docs.rs from <code>#[cfg]</code> attributes</h4>
49-
<p>
50-
You can detect Docs.rs by having a <a href="https://doc.rust-lang.org/cargo/reference/features.html">feature</a>
51-
which is only set by Docs.rs. See <a href="metadata">Metadata</a> for more information.
52-
</p>
53-
54-
<h4>Global sandbox limits</h4>
55-
56-
<p>
57-
All the builds on docs.rs are executed inside a sandbox with limited
58-
resources. The current limits are the following:
59-
</p>
60-
61-
{{ macros::crate_limits(limits=limits) }}
62-
63-
<p>
64-
If a build fails because it hit one of those limits please
65-
<a href="{{ docsrs_repo | safe }}/issues/new/choose">open an issue</a>
66-
to get them increased for your crate.
67-
Note that network access will not be enabled for any crate.
68-
</p>
69-
70-
<h4>Test crate documentation build locally</h4>
71-
{%- set build_subcommand = docsrs_repo ~ "/blob/master/README.md#build-subcommand" -%}
72-
<p>
73-
The <a href="{{ build_subcommand | safe }}">docs.rs README</a> describes how to build an
74-
unpublished crate's documentation locally using the same build environment as the build agent.
75-
</p>
76-
</div>
77-
6+
{%- set docsrs_repo = "https://github.com/rust-lang/docs.rs" -%}
7+
<h1>Builds</h1>
8+
<div class="container about">
9+
<p>
10+
Docs.rs automatically builds crates' documentation released on
11+
<a href="https://crates.io/">crates.io</a>
12+
using the nightly release of the Rust compiler.
13+
Builds can take a while depending how many crates are in <a href="/releases/queue">the queue</a>.
14+
</p>
15+
16+
<p>
17+
{%- if rustc_version %}
18+
The current version of the Rust compiler in use is <code>{{ rustc_version }}</code>.
19+
{%- endif -%}
20+
</p>
21+
22+
<p>
23+
The README of a crate is taken from the <code>readme</code> field defined in
24+
<code>Cargo.toml</code>. If a crate doesn't have this field,
25+
no README will be displayed.
26+
</p>
27+
28+
<h3>Diagnosing a failed build</h3>
29+
30+
<h4>Missing dependencies</h4>
31+
<p>
32+
Missing dependencies are a common reason for a failed build.
33+
Docs.rs dependencies are managed through
34+
<a href="https://github.com/rust-lang/crates-build-env">crates-build-env</a>;
35+
see <a href="https://forge.rust-lang.org/docs-rs/add-dependencies.html">Forge</a> for instructions
36+
on how to make a PR. You can always <a href="{{ docsrs_repo | safe }}/issues">file an issue</a>
37+
if you're having trouble.
38+
</p>
39+
40+
<h4>Detecting Docs.rs from <code>build.rs</code></h4>
41+
<p>
42+
Docs.rs builds crates with the environment variable <code>DOCS_RS</code> set to
43+
<code>1</code>, which enables the crate to detect docs.rs and build the
44+
crate differently. This can be helpful if you need
45+
dependencies for building the library, but not for building the documentation.
46+
</p>
47+
48+
<h4>Detecting Docs.rs from <code>#[cfg]</code> attributes</h4>
49+
<p>
50+
You can detect Docs.rs by having a <a href="https://doc.rust-lang.org/cargo/reference/features.html">feature</a>
51+
which is only set by Docs.rs. See <a href="metadata">Metadata</a> for more information.
52+
</p>
53+
54+
<h4>Global sandbox limits</h4>
55+
56+
<p>
57+
All the builds on docs.rs are executed inside a sandbox with limited
58+
resources. The current limits are the following:
59+
</p>
60+
61+
{{ macros::crate_limits(limits=limits) }}
62+
63+
<p>
64+
If a build fails because it hit one of those limits please
65+
<a href="{{ docsrs_repo | safe }}/issues/new/choose">open an issue</a>
66+
to get them increased for your crate.
67+
Note that network access will not be enabled for any crate.
68+
</p>
69+
70+
<h4>Test crate documentation build locally</h4>
71+
{%- set build_subcommand = docsrs_repo ~ "/blob/master/README.md#build-subcommand" -%}
72+
<p>
73+
The <a href="{{ build_subcommand | safe }}">docs.rs README</a> describes how to build an
74+
unpublished crate's documentation locally using the same build environment as the build agent.
75+
</p>
76+
</div>
7877
{%- endblock body %}
7978

8079
{% block css -%}

templates/core/about/index.html

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -3,45 +3,45 @@
33
{%- block title -%} About Docs.rs {%- endblock title -%}
44

55
{%- block body -%}
6-
{%- set docsrs_repo = "https://github.com/rust-lang/docs.rs" -%}
7-
8-
<h1 id="crate-title">About Docs.rs</h1>
9-
<div class="container about">
10-
<p>
11-
Docs.rs is an
12-
<a href="{{ docsrs_repo | safe }}">open source</a>
13-
documentation host for crates of the
14-
<a href="https://www.rust-lang.org/">Rust Programming Language</a>.
15-
All libraries published to <a href="https://crates.io">crates.io</a>
16-
are documented. If you just published a crate, your crate is likely
17-
still in <a href="/releases/queue">the queue</a>.
18-
</p>
19-
20-
<p>
21-
The source code of Docs.rs is available on
22-
<a href="{{ docsrs_repo | safe }}">GitHub</a>. If
23-
you ever encounter an issue, don't hesitate to report it! (And
24-
thanks in advance!)
25-
</p>
26-
27-
28-
<h2>More about Docs.rs</h2>
29-
<ol>
30-
<li><a href="/about/badges">Badges</a>: How to use badges generated by Docs.rs</li>
31-
<li><a href="/about/builds">Builds</a>: How Docs.rs builds documentation for a crate</li>
32-
<li><a href="/about/metadata">Metadata</a>: How you can configure a build</li>
33-
<li><a href="/about/redirections">Redirections</a>: How Docs.rs uses semantic versioning in URLs</li>
34-
</ol>
35-
36-
<h3>Version</h3>
37-
<p>Currently running Docs.rs version is: <strong>{{ docsrs_version() }}</strong></p>
38-
39-
<h3>Contact</h3>
40-
{%- set governance_link = "https://www.rust-lang.org/governance/teams/dev-tools#docs-rs" -%}
41-
<p>
42-
Docs.rs is run and maintained by the <a href="{{ governance_link | safe }}">Docs.rs team</a>.
43-
You can find us in #docs-rs on <a href="https://discordapp.com/invite/f7mTXPW/">Discord</a>.
44-
</p>
45-
46-
</div>
6+
{%- set docsrs_repo = "https://github.com/rust-lang/docs.rs" -%}
7+
8+
<h1 id="crate-title">About Docs.rs</h1>
9+
<div class="container about">
10+
<p>
11+
Docs.rs is an
12+
<a href="{{ docsrs_repo | safe }}">open source</a>
13+
documentation host for crates of the
14+
<a href="https://www.rust-lang.org/">Rust Programming Language</a>.
15+
All libraries published to <a href="https://crates.io">crates.io</a>
16+
are documented. If you just published a crate, your crate is likely
17+
still in <a href="/releases/queue">the queue</a>.
18+
</p>
19+
20+
<p>
21+
The source code of Docs.rs is available on
22+
<a href="{{ docsrs_repo | safe }}">GitHub</a>. If
23+
you ever encounter an issue, don't hesitate to report it! (And
24+
thanks in advance!)
25+
</p>
26+
27+
28+
<h2>More about Docs.rs</h2>
29+
<ol>
30+
<li><a href="/about/badges">Badges</a>: How to use badges generated by Docs.rs</li>
31+
<li><a href="/about/builds">Builds</a>: How Docs.rs builds documentation for a crate</li>
32+
<li><a href="/about/metadata">Metadata</a>: How you can configure a build</li>
33+
<li><a href="/about/redirections">Redirections</a>: How Docs.rs uses semantic versioning in URLs</li>
34+
</ol>
35+
36+
<h3>Version</h3>
37+
<p>Currently running Docs.rs version is: <strong>{{ docsrs_version() }}</strong></p>
38+
39+
<h3>Contact</h3>
40+
{%- set governance_link = "https://www.rust-lang.org/governance/teams/dev-tools#docs-rs" -%}
41+
<p>
42+
Docs.rs is run and maintained by the <a href="{{ governance_link | safe }}">Docs.rs team</a>.
43+
You can find us in #docs-rs on <a href="https://discordapp.com/invite/f7mTXPW/">Discord</a>.
44+
</p>
45+
46+
</div>
4747
{%- endblock body %}

0 commit comments

Comments
 (0)