Skip to content

Merge all documentation into one location #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,8 @@ _site
.jekyll-metadata
.bundle
vendor
repos/wasm-bindgen
repos/book
repos/wasm-pack
_site
_build.yml
16 changes: 16 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
language: rust

before_install:
- 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 -
- export PATH=$PATH:`pwd`
- bundler install

script:
- ./ci/build.sh

deploy:
provider: script
script: curl -LsSf https://git.io/fhJ8n | rustc - && (cd _site && ../rust_out)
skip_cleanup: true
on:
branch: master
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ plugins:
exclude:
- template.md
- vendor/bundle/
- repos
# - Gemfile
# - Gemfile.lock
# - node_modules
Expand Down
3 changes: 2 additions & 1 deletion _includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
</label>

<div class="trigger">
<a class="page-link" href="https://rustwasm.github.io/book/">📚 Learn</a>
<a class="page-link" href="/docs.html">📚 Learn</a>
<a class="page-link" href="/">📖 Blog</a>
<a class="page-link" href="https://github.com/rustwasm/team/blob/master/README.md#get-involved">👯 Get Involved</a>
{%- for path in page_paths -%}
{%- assign my_page = site.pages | where: "path", path | first -%}
Expand Down
6 changes: 5 additions & 1 deletion _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@
{%- include header.html -%}

<main class="page-content" aria-label="Content">
{%- if layout.unwrapped -%}
{{ content }}
{%- else -%}
<div class="wrapper">
{{ content }}
</div>
{%- endif -%}
</main>

{%- include footer.html -%}
Expand All @@ -19,4 +23,4 @@

</body>

</html>
</html>
116 changes: 48 additions & 68 deletions _layouts/home.html
Original file line number Diff line number Diff line change
@@ -1,71 +1,51 @@
---
layout: default
unwrapped: true
---

<!DOCTYPE html>
<html lang="{{ page.lang | default: site.lang | default: "en" }}">

{%- include head.html -%}

<body>

{%- include header.html -%}

<main class="page-content" aria-label="Content">
<div class="home">
{%- if page.title -%}
<h1 class="page-heading">{{ page.title }}</h1>
{%- if page.title -%}
<h1 class="page-heading">{{ page.title }}</h1>
{%- endif -%}

<section id="call-to-action">
<div class="wrapper">
<img src="{{ "/assets/wasm-ferris.png" | relative_url }}"/>
<h2>Learn Rust and WebAssembly</h2>
<p>
<a href="docs.html">Read the Rust and WebAssembly documentation</a> to
learn how to design, develop, test, debug, profile, and publish Rust and
WebAssembly libraries and applications.
</p>
<h2>Get Involved</h2>
<p>
<a href="https://github.com/rustwasm/team/blob/master/README.md#get-involved">Join the Rust and WebAssembly domain working group!</a> Help us craft the future of Rust and WebAssembly.
</p>
</div>
</section>

<div class="wrapper">
{{ content }}

{%- if site.posts.size > 0 -%}
<section>
<h2 class="post-list-heading">{{ page.list_title | default: "Blog Posts" }}</h2>
<ul class="post-list">
{%- for post in site.posts -%}
<li>
{%- assign date_format = site.minima.date_format | default: "%b %-d, %Y" -%}
<span class="post-meta">{{ post.date | date: date_format }}</span>
<h3>
<a class="post-link" href="{{ post.url | relative_url }}">
{{ post.title | escape }}
</a>
</h3>
{%- if site.show_excerpts -%}
{{ post.excerpt }}
{%- endif -%}

<section id="call-to-action">
<div class="wrapper">
<img src="{{ "/assets/wasm-ferris.png" | relative_url }}"/>
<h2>Learn Rust and WebAssembly</h2>
<p>
<a href="https://rustwasm.github.io/book/">Read the Rust and WebAssembly book</a> to
learn how to design, develop, test, debug, profile, and publish Rust and
WebAssembly libraries and applications.
</p>
<h2>Get Involved</h2>
<p>
<a href="https://github.com/rustwasm/team/blob/master/README.md#get-involved">Join the Rust and WebAssembly domain working group!</a> Help us craft the future of Rust and WebAssembly.
</p>
</div>
</section>

{{ content }}

<div class="wrapper">
{%- if site.posts.size > 0 -%}
<section>
<h2 class="post-list-heading">{{ page.list_title | default: "Blog Posts" }}</h2>
<ul class="post-list">
{%- for post in site.posts -%}
<li>
{%- assign date_format = site.minima.date_format | default: "%b %-d, %Y" -%}
<span class="post-meta">{{ post.date | date: date_format }}</span>
<h3>
<a class="post-link" href="{{ post.url | relative_url }}">
{{ post.title | escape }}
</a>
</h3>
{%- if site.show_excerpts -%}
{{ post.excerpt }}
{%- endif -%}
</li>
{%- endfor -%}
</ul>

<p class="rss-subscribe">subscribe <a href="{{ "/feed.xml" | relative_url }}">via RSS</a></p>
</section>
{%- endif -%}
</div>
</div>
</main>

{%- include footer.html -%}

{%- include analytics.html -%}

</body>

</html>
</li>
{%- endfor -%}
</ul>

<p class="rss-subscribe">subscribe <a href="{{ "/feed.xml" | relative_url }}">via RSS</a></p>
</section>
{%- endif -%}
</div>
20 changes: 20 additions & 0 deletions assets/extra.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,23 @@
section {
clear: both;
}

#installer {
text-align: center;
}

#installer .button {
background-color: #6556EC;
border-color: #6556EC;
height: 20%;
font-size: 1.8rem;
padding: 1.8rem;
color: #fff;
font-weight: 600;
line-height: 38px;
border-radius: 4px;
display: inline-block;
}
#installer .button:hover {
text-decoration: none;
}
38 changes: 38 additions & 0 deletions ci/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/sh
set -ex

mkdir -p repos

if [ ! -d repos/wasm-bindgen ]; then
git clone https://github.com/rustwasm/wasm-bindgen repos/wasm-bindgen
fi
if [ ! -d repos/wasm-pack ]; then
git clone https://github.com/rustwasm/wasm-pack repos/wasm-pack
fi
if [ ! -d repos/book ]; then
git clone https://github.com/rustwasm/book repos/book
fi

wasm_bindgen_tag=$(cd repos/wasm-bindgen && git describe --abbrev=0 --tags)
wasm_pack_tag=$(cd repos/wasm-pack && git describe --abbrev=0 --tags)

(cd repos/wasm-bindgen && git reset --hard $wasm_bindgen_tag)
(cd repos/wasm-pack && git reset --hard $wasm_pack_tag)

wasm_pack_publish_date=$(date -d "@$(cd repos/wasm-pack && git show -s --format=%at)" "+%b %e")

echo "wasm-pack-tag: $wasm_pack_tag" >> _build.yml
echo "wasm-pack-publish-date: $wasm_pack_publish_date" >> _build.yml

bundler exec jekyll build --config _config.yml,_build.yml

mkdir -p _site/docs
mdbook build repos/wasm-bindgen/guide
mv repos/wasm-bindgen/guide/book _site/docs/wasm-bindgen

mdbook build repos/wasm-pack/docs
mv repos/wasm-pack/docs/book _site/docs/wasm-pack

mdbook build repos/book
mv repos/book/book _site/docs/book

3 changes: 3 additions & 0 deletions docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* [The rustwasm book](docs/book)
* [The wasm-bindgen book](docs/wasm-bindgen)
* [The wasm-pack book](docs/wasm-pack)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This page is very bare bones and much smaller than it would otherwise want to be before merging

9 changes: 9 additions & 0 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,12 @@
# See: https://jekyllrb.com/docs/themes/#overriding-theme-defaults
layout: home
---

<div id="installer">
<a class="button button-primary" href="https://rustwasm.github.io/wasm-pack/installer">✨ Install wasm-pack 0.6.0 ✨</a>
<p>{{ site.wasm-pack-publish-date }} |
<a href="https://github.com/rustwasm/wasm-pack/releases/tag/{{- site.wasm-pack-tag -}}">
Release Notes
</a>
</p>
</div>