Skip to content

Commit

Permalink
address review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
steveklabnik committed Aug 11, 2017
1 parent 92f8442 commit 1e4aaea
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/doc/rustdoc/src/the-doc-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,35 +46,41 @@ These options control how the docs look at a macro level.
This form of the `doc` attribute lets you control the favicon of your docs.

```rust,ignore
#![doc(html_favicon_url = "https://foo.com/favicon.ico")]
#![doc(html_favicon_url = "https://example.com/favicon.ico")]
```

This will put `<link rel="shortcut icon" href="{}">` into your docs, where
the string for the attribute goes into the `{}`.

If you don't use this attribute, there will be no favicon.

### `html_logo_url`

This form of the `doc` attribute lets you control the logo in the upper
left hand side of the docs.

```rust,ignore
#![doc(html_logo_url = "https://foo.com/logo.jpg")]
#![doc(html_logo_url = "https://example.com/logo.jpg")]
```

This will put `<a href='index.html'><img src='{}' alt='logo' width='100'></a>` into
your docs, where the string for the attribute goes into the `{}`.

If you don't use this attribute, there will be no logo.

### `html_playground_url`

This form of the `doc` attribute lets you control where the "run" buttons
on your documentation examples make requests to.

```rust,ignore
#![doc(html_playground_url = "https://playground.foo.com/")]
#![doc(html_playground_url = "https://playground.example.com/")]
```

Now, when you press "run", the button will make a request to this domain.

If you don't use this attribute, there will be no run buttons.

### `issue_tracker_base_url`

This form of the `doc` attribute is mostly only useful for the standard library;
Expand All @@ -83,7 +89,7 @@ given. `rustdoc` uses this number, plus the base URL given here, to link to
the tracking issue.

```rust,ignore
#![doc(issue_tracker_base_url = "https://github.com/foo/foo/issues/")]
#![doc(issue_tracker_base_url = "https://github.com/rust-lang/rust/issues/")]
```

### `html_no_source`
Expand Down

0 comments on commit 1e4aaea

Please sign in to comment.