-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1709 from joshrotenberg/markdown-page
Markdown page
- Loading branch information
Showing
4 changed files
with
109 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
# Markdown | ||
|
||
mdBook's [parser](https://github.com/raphlinus/pulldown-cmark) adheres to the [CommonMark](https://commonmark.org/) | ||
specification. You can take a quick [tutorial](https://commonmark.org/help/tutorial/), | ||
or [try out](https://spec.commonmark.org/dingus/) CommonMark in real time. A complete Markdown overview is out of scope for | ||
this documentation, but below is a high level overview of some of the basics. For a more in-depth experience, check out the | ||
[Markdown Guide](https://www.markdownguide.org). | ||
|
||
## Text and Paragraphs | ||
|
||
Text is rendered relatively predictably: | ||
|
||
```markdown | ||
Here is a line of text. | ||
|
||
This is a new line. | ||
``` | ||
|
||
Will look like you might expect: | ||
|
||
Here is a line of text. | ||
|
||
This is a new line. | ||
|
||
## Headings | ||
|
||
Headings use the `#` marker and should be on a line by themselves. More `#` mean smaller headings: | ||
|
||
```markdown | ||
### A heading | ||
|
||
Some text. | ||
|
||
#### A smaller heading | ||
|
||
More text. | ||
``` | ||
|
||
### A heading | ||
|
||
Some text. | ||
|
||
#### A smaller heading | ||
|
||
More text. | ||
|
||
## Lists | ||
|
||
Lists can be unordered or ordered. Ordered lists will order automatically: | ||
|
||
```markdown | ||
* milk | ||
* eggs | ||
* butter | ||
|
||
1. carrots | ||
1. celery | ||
1. radishes | ||
``` | ||
|
||
* milk | ||
* eggs | ||
* butter | ||
|
||
1. carrots | ||
1. celery | ||
1. radishes | ||
|
||
## Links | ||
|
||
Linking to a URL or local file is easy: | ||
|
||
```markdown | ||
Use [mdBook](https://github.com/rust-lang/mdBook). | ||
|
||
Read about [mdBook](mdBook.md). | ||
|
||
A bare url: <https://www.rust-lang.org>. | ||
``` | ||
|
||
Use [mdBook](https://github.com/rust-lang/mdBook). | ||
|
||
Read about [mdBook](mdBook.md). | ||
|
||
A bare url: <https://www.rust-lang.org>. | ||
|
||
## Images | ||
|
||
Including images is simply a matter of including a link to them, much like in the _Links_ section above. The following markdown | ||
includes the Rust logo SVG image found in the `images` directory at the same level as this file: | ||
|
||
```markdown | ||
 | ||
``` | ||
|
||
Produces the following HTML when built with mdBook: | ||
|
||
```html | ||
<p><img src="images/rust-logo-blk.svg" alt="The Rust Logo" /></p> | ||
``` | ||
|
||
Which, of course displays the image like so: | ||
|
||
 | ||
|
||
|
||
See the [Markdown Guide Basic Syntax](https://www.markdownguide.org/basic-syntax/) document for more. |