Skip to content

Commit 7627b8e

Browse files
authored
Merge pull request #1329 from alexcrichton/nightly-header
Add a "nightly only" warning to documentation
2 parents 0b7fab4 + 91e4736 commit 7627b8e

File tree

7 files changed

+68
-11
lines changed

7 files changed

+68
-11
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ links = "wasm_bindgen"
1010
readme = "README.md"
1111
categories = ["wasm"]
1212
repository = "https://github.com/rustwasm/wasm-bindgen"
13-
homepage = "https://rustwasm.github.io/wasm-bindgen/"
13+
homepage = "https://rustwasm.github.io/"
1414
documentation = "https://docs.rs/wasm-bindgen"
1515
description = """
1616
Easy support for interacting between JS and Rust.

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,17 @@ greet("World!");
6060

6161
## Guide
6262

63-
[**📚 Read the `wasm-bindgen` guide here! 📚**](https://rustwasm.github.io/wasm-bindgen)
63+
[**📚 Read the `wasm-bindgen` guide here! 📚**](https://rustwasm.github.io/docs/wasm-bindgen/)
64+
65+
You can find general documentation about Rust and WebAssembly
66+
[here](https://rustwasm.github.io/docs).
6467

6568
## API Docs
6669

67-
- [wasm-bindgen](https://rustwasm.github.io/wasm-bindgen/api/wasm_bindgen/)
68-
- [js-sys](https://rustwasm.github.io/wasm-bindgen/api/js_sys/)
69-
- [web-sys](https://rustwasm.github.io/wasm-bindgen/api/web_sys/)
70+
- [wasm-bindgen](https://docs.rs/wasm-bindgen)
71+
- [js-sys](https://docs.rs/js-sys)
72+
- [web-sys](https://docs.rs/web-sys)
73+
- [wasm-bindgen-futures](https://docs.rs/wasm-bindgen-futures)
7074

7175
## License
7276

azure-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ jobs:
236236
curl -L https://github.com/rust-lang-nursery/mdBook/releases/download/v0.2.1/mdbook-v0.2.1-x86_64-unknown-linux-musl.tar.gz | tar xzf - -C $HOME/mdbook
237237
echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/mdbook"
238238
displayName: "Install mdbook"
239-
- script: (cd guide && mdbook build)
239+
- script: (cd guide && mv _theme theme && mdbook build)
240240
- task: PublishPipelineArtifact@0
241241
inputs:
242242
artifactName: doc_book

guide/_theme/header.hbs

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<style>
2+
header.warning {
3+
background-color: rgb(242, 222, 222);
4+
border-bottom-color: rgb(238, 211, 215);
5+
border-bottom-left-radius: 4px;
6+
border-bottom-right-radius: 4px;
7+
border-bottom-style: solid;
8+
border-bottom-width: 0.666667px;
9+
border-image-outset: 0 0 0 0;
10+
border-image-repeat: stretch stretch;
11+
border-image-slice: 100% 100% 100% 100%;
12+
border-image-source: none;
13+
border-image-width: 1 1 1 1;
14+
border-left-color: rgb(238, 211, 215);
15+
border-left-style: solid;
16+
border-left-width: 0.666667px;
17+
border-right-color: rgb(238, 211, 215);
18+
border-right-style: solid;
19+
border-right-width: 0.666667px;
20+
border-top-color: rgb(238, 211, 215);
21+
border-top-left-radius: 4px;
22+
border-top-right-radius: 4px;
23+
border-top-style: solid;
24+
border-top-width: 0.666667px;
25+
color: rgb(185, 74, 72);
26+
margin-bottom: 0px;
27+
margin-left: 0px;
28+
margin-right: 0px;
29+
margin-top: 30px;
30+
padding-bottom: 8px;
31+
padding-left: 14px;
32+
padding-right: 35px;
33+
padding-top: 8px;
34+
text-align: center;
35+
}
36+
</style>
37+
<header class='warning'>
38+
This is the <strong>unpublished</strong> documentation of
39+
<code>wasm-bindgen</code>, the published documentation is available
40+
<a href="https://rustwasm.github.io/docs/wasm-bindgen/">
41+
on the main Rust and WebAssembly documentation site
42+
</a>. Features documented here may not be available in released versions of
43+
<code>wasm-bindgen</code>.
44+
</header>

guide/src/contributing/index.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
# Contributing to `wasm-bindgen`
22

33
This section contains instructions on how to get this project up and running for
4-
development.
4+
development. You may want to browse the [unpublished guide documentation] for
5+
`wasm-bindgen` as well as it may have more up-to-date information.
6+
7+
[unpublished documentation]: https://rustwasm.github.io/wasm-bindgen/
58

69
## Prerequisites
710

8-
1. Rust Nightly. [Install Rust]. Once Rust is installed, run
11+
1. Rust. [Install Rust]. Once Rust is installed, run
912

1013
```shell
11-
rustup default nightly
1214
rustup target add wasm32-unknown-unknown
1315
```
1416

guide/src/contributing/js-sys/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ and its source lives at [`wasm-bindgen/crates/js-sys`][src]. With the `js-sys`
66
crate, we can work with `Object`s, `Array`s, `Function`s, `Map`s, `Set`s,
77
etc... without writing the `#[wasm_bindgen]` imports by hand.
88

9-
Documentation for this crate will eventually be available on [docs.rs][docsrs]
10-
but temporarily you can also check out the [master branch
9+
Documentation for the published version of this crate is available on
10+
[docs.rs][docsrs] but you can also check out the [master branch
1111
documentation][masterdoc] for the crate.
1212

1313
[docsrs]: https://docs.rs/js-sys

guide/src/contributing/web-sys/index.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,10 @@ using `wasm-bindgen`'s WebIDL frontend and the WebIDL interface definitions for
88
Web APIs. This means that `web-sys` isn't always the most ergonomic crate to
99
use, but it's intended to provide verified and correct bindings to the web
1010
platform, and then better interfaces can be iterated on crates.io!
11+
12+
Documentation for the published version of this crate is available on
13+
[docs.rs][docsrs] but you can also check out the [master branch
14+
documentation][masterdoc] for the crate.
15+
16+
[docsrs]: https://docs.rs/web-sys
17+
[masterdoc]: https://rustwasm.github.io/wasm-bindgen/api/js_sys/

0 commit comments

Comments
 (0)