• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

INFO-201/m3-markdown: Module 3: Markdown

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

INFO-201/m3-markdown

开源软件地址(OpenSource Url):

https://github.com/INFO-201/m3-markdown

开源编程语言(OpenSource Language):


开源软件介绍(OpenSource Introduction):

Module 3: Markdown

Overview

Markdown syntax provides a simple way to describe the desired formatting of text documents. In fact, all of the learning modules (including this one you're reading) were written using Markdown! With only a small handful of options, Markdown allows you to provide structure to a document, as well as formatting to your text (like bold, or italics). There are a number of programs that support the rendering of Markdown, including GitHub, Slack, and StackOverflow (note: the syntax implementation may vary slightly across programs). In this section, you'll learn the basics of Markdown syntax, and how to leverage it.

Contents

Resources

Writing Markdown

Markdown is an easy to write (and easy to read) syntax for declaring document structure and formatting. In the text-editor of your choice, you can add Markdown syntax to plain text to provide your writing with structure and emphasis.

Document Structure

Markdown isn't just about adding bold and italics to your paragraphs - it enables you to create distinct sections of your page, such as a header or a block of code. Markdown is most easily explained through example, so let's take a look at how a few simple approaches can produce a thoroughly formatted document (code on the left, rendered version on the right):

screenshot of markdown structure

As you can see, the document (right) is produced using the following Markdown shorthand:

Symbol Format
# Top level header (## for 2nd level header, ... ,###### for 6th level header)
``` Code section
- Unordered list item
> Block quote

And as you can see, Markdown can even make tables!

Text formatting

In addition to lending structure to your documents, the use of Markdown allows you to declare text formatting options. Let's take a look at another example:

screenshot of markdown text formatting

Symbol Format
`WORD` Inline code element
**WORD** Bold
_WORD_ Italics

For more thorough lists of Markdown options, see the online resources linked above. To practice your Markdown skills, see exercise-1 and exercise-2.

Rendering Markdown

In order to view the rendered version of your Markdown sytax, you need to use a program that converts from Markdown into a formatted document. Luckily, GitHub will automatically render your README.md files, and Slack/StackOverflow will automatically format your messages. However, it can be helpful to preview your rendered markdown before pushing your code. Here are a few options to do so:

Markdown Reader (Chrome Extension)

There are a number of Google Chrome Extensions that you can install that will render Markdown files for you. One which I've found useful is Markdown Reader, which provides you with a simple rendering of a Markdown file (note, it may differ slightly from the way GitHub would render the document). Once you've installed the Extension, you can drag + drop a .md file into a blank Chrome tab to view the formatted document. Double-click to view the raw code.

Online Editors

There are a variety of Markdown editors online that you can use to practice Markdown. This isn't likely how you'll want to write your code, but they're a fun sandbox to get started. One I've found easy to use is dillinger, though there are plenty if you are looking for something more specific.

Macdown

Macdown is a program (for Macs only, unfortunately) that is designed for writing Markdown documents. It's biggest advantage is that it provides a live view of how your Markdown document will be rendered:

macdown-preview-screenshot

Download here.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap