Skip to content
This repository has been archived by the owner on Sep 30, 2020. It is now read-only.

Add a documentation page. Restructure navigation #241

Closed
wants to merge 10 commits into from
38 changes: 6 additions & 32 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,39 +24,13 @@
<img class="img-responsive" src="logos/rust-logo-blk.svg" onerror="this.src='logos/rust-logo-256x256-blk.png'" height="128" width="128" alt="Rust logo" />
</a>
</li>
<li class="col-xs-4 col-md-2"><h2>Docs (1.5.0)</h2>
<ul>
<li><a href="https://doc.rust-lang.org/stable/book/">Book</a></li>
<li><a href="https://doc.rust-lang.org/stable/reference.html">Reference</a></li>
<li>
<a href="https://doc.rust-lang.org/stable/std/">API docs</a></li>
<li><a href="https://doc.rust-lang.org/stable/">All docs</a>
</li>
</ul>
</li>
<li class="col-xs-4 col-md-2"><h2>Docs (Nightly)</h2>
<ul>
<li><a href="https://doc.rust-lang.org/nightly/book/">Book</a></li>
<li><a href="https://doc.rust-lang.org/nightly/reference.html">Reference</a></li>
<li>
<a href="https://doc.rust-lang.org/nightly/std/index.html">API docs</a></li>
<li><a href="https://doc.rust-lang.org/nightly/index.html">All docs</a>
</li>
</ul>
</li>
<li class="col-xs-4 col-md-2"><h2>Resources</h2>
<ul>
<li>
<a href="community.html">Community</a>
</li>
<li>
<a href="legal.html">Legal</a>
</li>
<li>
<a href="security.html">Security</a>
</li>
</ul>
<li class="col-xs-12 col-md-10 menu">
<h2><a href="documentation.html">Documentation</a></h2>
<h2><a href="community.html">Community</a></h2>
<h2><a href="downloads.html">Downloads</a></h2>
<h2><a href="contribute.html">Contribute</a></h2>
</li>
</ul>
</header>
{{ content }}
<script>
Expand Down
4 changes: 2 additions & 2 deletions community.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
layout: default
title: Rust Community &middot; The Rust Programming Language
title: The Rust Community &middot; The Rust Programming Language
---

# Rust Community
# The Rust Community

Rust is an amazing programming language, but its greatest strength
is its kind and inclusive community.
Expand Down
9 changes: 7 additions & 2 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,15 @@ ul.menu li {
margin-top: 0em;
margin-bottom: 0em;
}
ul.menu li.menu {
margin-top: 3em;
}
ul.menu h2 {
font-size: 15.4px;
font-size: 20px;
font-weight: 500;
margin: .8em 0;
margin: 1em;
display: inline;
line-height: 1.5em;
}
ul.menu li>ul {
margin-top: .5em;
Expand Down
92 changes: 92 additions & 0 deletions documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
---
layout: default
title: Rust Documentation &middot; The Rust Programming Language
---

# Rust Documentation

If you haven't seen Rust at all yet, the first thing you should read
is the introduction to the book, [**The Rust Programming
Language**][book]. It will give you a good idea of what Rust is like,
show you how to install it, and explain its syntax and concepts. Upon
completing the book, you'll be an intermediate Rust developer, and
will have a good grasp of the fundamental ideas behind Rust.

## Learning Rust

[**The Rust Programming Language**][book]. Also known as "The Book",
The Rust Programming Language is the most comprehensive resource for
all topics related to Rust, and is the primary official document of
the language.

[**Rust by Example**][rbe]. A collection of self-contained Rust
examples on a variety of topics, executable in-browser.

[**Frequently asked questions**][faq].

[**The Rustonomicon**][nomicon]. An entire book dedicated to
explaining how to write unsafe Rust code. It is for advanced Rust
programmers.

[**rust-learning**]. A community-maintained collection of resources
for learning Rust.

[book]: https://doc.rust-lang.org/book/
[rbe]: http://rust-by-example.com
[faq]: faq.html
[nomicon]: https://doc.rust-lang.org/nomicon/
[**rust-learning**]: https://github.com/ctjhoa/rust-learning

## References

[**Standard Library API Reference**][api]. Documentation for the
standard library.

[**The Rust Reference**][ref]. While Rust does not have a
specification, the reference tries to describe its working in
detail. It tends to be out of date.

[**Syntax Index**][syn]. This appendix from The Book contains examples
of all syntax in Rust cross-referenced with the section of The Book
that describes it.

[**The Cargo Guide**][cargo]. The documentation for Cargo,
Rust's package manager.

[**Compiler Error Index**][err]. Extended explanations of
the errors produced by the Rust compiler.

[api]: https://doc.rust-lang.org/std/
[syn]: https://doc.rust-lang.org/book/syntax-index.html
[ref]: https://doc.rust-lang.org/reference.html
[cargo]: http://doc.crates.io/guide.html
[err]: https://doc.rust-lang.org/error-index.html

## Project policies

[**Rust security policy**][security]. The project's policies for
reporting, fixing and disclosing security-related bugs.

[**Rust copyright and trademark policies**][legal]. The Rust
copyrights are owned by The Rust Project Developers, and its
trademarks are owned by Mozilla. Appropriate usage of Rust's
trademarks are described here.

[security]: security.html
[legal]: legal.html

## Nightly and beta documentation

Much of the official Rust documentation is also available for the
[nightly] and [beta] releases in addition to the stable documentation
linked above.

[nightly]: http://doc.rust-lang.org/nightly/
[beta]: http://doc.rust-lang.org/beta/

## Non-english resources

For resources in languages other than English, see the
[locale-specific links in rust-learning][locale].

[locale]: https://github.com/ctjhoa/rust-learning#locale-links
35 changes: 35 additions & 0 deletions links
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
x CONTRIBUTING.md:133:Documentation improvements are very welcome. The source of `doc.rust-lang.org`
x CONTRIBUTING.md:238:[gsearchdocs]: https://www.google.de/search?q=site:doc.rust-lang.org+your+query+here
x src/doc/not_found.md:51: search.value = op.join(' ') + " site:doc.rust-lang.org";
x src/doc/trpl/documentation.md:557: html_root_url = "https://doc.rust-lang.org/")]
#![doc] src/liballoc/lib.rs:71: html_root_url = "https://doc.rust-lang.org/nightly/",
#![doc] src/libarena/lib.rs:31: html_root_url = "https://doc.rust-lang.org/nightly/")]
src/libcollections/lib.rs:27: html_root_url = "https://doc.rust-lang.org/nightly/",
src/libcore/lib.rs:60: html_root_url = "https://doc.rust-lang.org/nightly/",
src/libflate/lib.rs:26: html_root_url = "https://doc.rust-lang.org/nightly/")]
src/libfmt_macros/lib.rs:26: html_root_url = "https://doc.rust-lang.org/nightly/",
src/libgetopts/lib.rs:90: html_root_url = "https://doc.rust-lang.org/nightly/",
src/libgraphviz/lib.rs:286: html_root_url = "https://doc.rust-lang.org/nightly/")]
src/liblibc/lib.rs:23: html_root_url = "https://doc.rust-lang.org/nightly/",
src/liblog/lib.rs:169: html_root_url = "https://doc.rust-lang.org/nightly/",
src/librand/lib.rs:25: html_root_url = "https://doc.rust-lang.org/nightly/",
src/librbml/lib.rs:123: html_root_url = "https://doc.rust-lang.org/nightly/",
src/librustc/lib.rs:26: html_root_url = "https://doc.rust-lang.org/nightly/")]
src/librustc_back/lib.rs:33: html_root_url = "https://doc.rust-lang.org/nightly/")]
src/librustc_borrowck/lib.rs:20: html_root_url = "https://doc.rust-lang.org/nightly/")]
src/librustc_data_structures/lib.rs:28: html_root_url = "https://doc.rust-lang.org/nightly/")]
src/librustc_driver/lib.rs:26: html_root_url = "https://doc.rust-lang.org/nightly/")]
src/librustc_front/lib.rs:26: html_root_url = "http://doc.rust-lang.org/nightly/")]
src/librustc_lint/lib.rs:31: html_root_url = "https://doc.rust-lang.org/nightly/")]
src/librustc_llvm/lib.rs:26: html_root_url = "https://doc.rust-lang.org/nightly/")]
src/librustc_privacy/lib.rs:20: html_root_url = "https://doc.rust-lang.org/nightly/")]
src/librustc_resolve/lib.rs:20: html_root_url = "https://doc.rust-lang.org/nightly/")]
src/librustc_trans/lib.rs:26: html_root_url = "https://doc.rust-lang.org/nightly/")]
src/librustc_typeck/lib.rs:74: html_root_url = "https://doc.rust-lang.org/nightly/")]
src/librustc_unicode/lib.rs:31: html_root_url = "https://doc.rust-lang.org/nightly/",
src/librustdoc/lib.rs:20: html_root_url = "https://doc.rust-lang.org/nightly/",
src/libserialize/lib.rs:28: html_root_url = "https://doc.rust-lang.org/nightly/",
src/libstd/lib.rs:196: html_root_url = "https://doc.rust-lang.org/nightly/",
src/libsyntax/lib.rs:26: html_root_url = "https://doc.rust-lang.org/nightly/")]
src/libterm/lib.rs:55: html_root_url = "https://doc.rust-lang.org/nightly/",
src/libtest/lib.rs:35: html_root_url = "https://doc.rust-lang.org/nightly/")]