From c32869cf1047ff249cae3aff081dc6414b55e465 Mon Sep 17 00:00:00 2001 From: josh rotenberg Date: Fri, 17 Dec 2021 19:08:03 -0800 Subject: [PATCH 1/5] moving this to the markdown page --- guide/src/README.md | 7 ------- 1 file changed, 7 deletions(-) diff --git a/guide/src/README.md b/guide/src/README.md index ac6f48e7..7bbfd995 100644 --- a/guide/src/README.md +++ b/guide/src/README.md @@ -18,13 +18,6 @@ In addition to the above features, mdBook also has a Rust [API](https://docs.rs/ write your own preprocessor or renderer, as well as incorporate mdBook features into other applications. The [For Developers](for_developers) section of this guide contains more information and some examples. -## 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. For a more in-depth experience, check out the -[Markdown Guide](https://www.markdownguide.org). - ## Contributing mdBook is free and open source. You can find the source code on From b38949a408bb9817579bdf4c7b71f69821d23d26 Mon Sep 17 00:00:00 2001 From: josh rotenberg Date: Fri, 17 Dec 2021 19:08:21 -0800 Subject: [PATCH 2/5] add a markdown page --- guide/src/SUMMARY.md | 1 + 1 file changed, 1 insertion(+) diff --git a/guide/src/SUMMARY.md b/guide/src/SUMMARY.md index 37e9fca0..181d7972 100644 --- a/guide/src/SUMMARY.md +++ b/guide/src/SUMMARY.md @@ -22,6 +22,7 @@ - [Editor](format/theme/editor.md) - [MathJax Support](format/mathjax.md) - [mdBook-specific features](format/mdbook.md) + - [Markdown](format/markdown.md) - [Continuous Integration](continuous-integration.md) - [For Developers](for_developers/README.md) - [Preprocessors](for_developers/preprocessors.md) From 18b9f42fbac3348ea796c2797ce9a4e5ecacd6c6 Mon Sep 17 00:00:00 2001 From: josh rotenberg Date: Fri, 17 Dec 2021 19:08:58 -0800 Subject: [PATCH 3/5] add the markdown page --- guide/src/format/images/rust-logo-blk.svg | 1 + guide/src/format/markdown.md | 34 +++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 guide/src/format/images/rust-logo-blk.svg create mode 100644 guide/src/format/markdown.md diff --git a/guide/src/format/images/rust-logo-blk.svg b/guide/src/format/images/rust-logo-blk.svg new file mode 100644 index 00000000..1a6c762d --- /dev/null +++ b/guide/src/format/images/rust-logo-blk.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/guide/src/format/markdown.md b/guide/src/format/markdown.md new file mode 100644 index 00000000..b23c2a99 --- /dev/null +++ b/guide/src/format/markdown.md @@ -0,0 +1,34 @@ +# 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 + +## Titles + +## Links + +## 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 +![The Rust Logo](images/rust-logo-blk.svg) +``` + +Produces the following HTML when built with mdBook: + +```html +

The Rust Logo

+``` + +Which, of course displays the image like so: + +![The Rust Logo](images/rust-logo-blk.svg) + +## Lists From 09087097b5cea8b4158886e05adc7e023be92584 Mon Sep 17 00:00:00 2001 From: josh rotenberg Date: Sat, 18 Dec 2021 15:50:51 -0800 Subject: [PATCH 4/5] add more sections here --- guide/src/format/markdown.md | 58 +++++++++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/guide/src/format/markdown.md b/guide/src/format/markdown.md index b23c2a99..7e807af7 100644 --- a/guide/src/format/markdown.md +++ b/guide/src/format/markdown.md @@ -8,7 +8,63 @@ this documentation, but below is a high level overview of some of the basics. Fo ## Text and Paragraphs -## Titles +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 From 2d36cd9263ab7867efc7e8a91dc533338febeda1 Mon Sep 17 00:00:00 2001 From: josh rotenberg Date: Sat, 18 Dec 2021 16:00:46 -0800 Subject: [PATCH 5/5] more markdown --- guide/src/format/markdown.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/guide/src/format/markdown.md b/guide/src/format/markdown.md index 7e807af7..74ecaf56 100644 --- a/guide/src/format/markdown.md +++ b/guide/src/format/markdown.md @@ -68,6 +68,22 @@ Lists can be unordered or ordered. Ordered lists will order automatically: ## 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: . +``` + +Use [mdBook](https://github.com/rust-lang/mdBook). + +Read about [mdBook](mdBook.md). + +A bare url: . + ## Images Including images is simply a matter of including a link to them, much like in the _Links_ section above. The following markdown @@ -87,4 +103,5 @@ Which, of course displays the image like so: ![The Rust Logo](images/rust-logo-blk.svg) -## Lists + +See the [Markdown Guide Basic Syntax](https://www.markdownguide.org/basic-syntax/) document for more.