Markdown Basics (included: Anchor use, HTML, new page jump, catalog generation)

Source: Internet
Author: User

GitHub style display reference: Dot Me
Previously said to write articles in Word, this time to say markdown write articles (recommended)
Inverse day recommended to write using Vscode

This plugin is more convenient to write:


Included: Anchor use, HTML, new page jump, catalog generation

How to enable:

H1~H3 (#的个数) [Blog Park only supports h1~3]
# H1## H2### H3
H1H2H3 Italic (one * italic), bold (two * bold), Strikethrough (two ~)
**加粗内容** 其他内容 *斜体内容* ~~删除内容~~

Bold content other content italic content Delete content

Reference (> or >>), code block (end of "'", delimiter (---), newline (empty line or BR label), Escape (\)

Reference:

>引用 | 块注释>从前有座山,山里有座庙>>里面再来个引用

References | Block annotations
There used to be a mountain, a temple in the mountains.

There's a quote.

Code block:
Start with "' (anti-quote)
End With a "(~ below)

If you want syntax highlighting in the "' followed by the lowercase language name, Eg:html,css,javascript,python,cs (CSharp), etc.

print("以 ```python开头,```结尾")
varnew List<object"C#""JavaScript" };
var infos_list = new List<object>() { "C#", "JavaScript" };

Separator:

---

Line break:

<br/><br/><br/>






Escape character

\<br/>

<br/>

HTML code

You can parse it directly by writing HTML:

<div>    <code>        print("mmd")    </code></div>
print("mmd") Hyperlinks, pictures, anchor jumps

Hyperlinks:

页面内打开:[超链接文字](url)写法1:汇总系列:[链接](https://www.cnblogs.com/dunitian/p/4822808.html#ai)写法2:汇总系列:

Summary series: Https://www.cnblogs.com/dunitian/p/4822808.html#ai

Summary series: Https://www.cnblogs.com/dunitian/p/4822808.html#ai

新页面打开:[超链接文字](url){:target="_blank"} (有些编辑器不支持,Python Markdown可以使用)不支持就用:<a href="xxx" target="_blank">xxx</a>写法1:汇总系列:[链接](https://www.cnblogs.com/dunitian/p/4822808.html#ai){:target="_blank"}写法2:汇总系列:

Summary series: https://www.cnblogs.com/dunitian/p/4822808.html#ai{:target= "_blank"}

Summary series: https://www.cnblogs.com/dunitian/p/4822808.html#ai{:target= "_blank"}

Summary series: Https://www.cnblogs.com/dunitian/p/4822808.html#ai

Picture: (exclamation mark Don't forget)

![alt标题](url地址)![博客园logo](https://www.cnblogs.com/images/logo_small.gif)

Anchor point: (Can not be implemented in HTML implementation can be)

我在正文开头定义了一个:<a name="divtop"></a>我们跳转过去:[跳转指定位置](#divtop)

Jump to specified position

List (unordered-ordered 1.2.3. Note spaces)
- 无序列表1    - 无序列表1.1    - 无序列表1.2        - 1.2.1- 无序列表2    1. 有序列表1    2. 有序列表2    3. 有序列表3        1. 3.1        2. 3.2            1. 3.2.1            2. 3.2.2- 无序列表3
    • No sequence table 1
      • Unordered List 1.1
      • Unordered List 1.2
        • 1.2.1
    • No sequence table 2
      1. With Sequence list 1
      2. With Sequence List 2
      3. With Sequence list 3
        1. 3.1
        2. 3.2
          • 3.2.1
          • 3.2.2
    • No sequence table 3
Directory generation with JS implementation, markdown way too tired

Blog Park upload js file, and then reference can

$(function(){    //Generate Directory Index list    varMainContent= $(' #cnblogs_post_body ');    varH2_list= $(' #cnblogs_post_body H2 ');//If your chapter title is not H2, just replace the H2 here    if(maincontent.length < 1)return;    if(h2_list.length > 0){        varContent= ' <a name= ' _labeltop ' ></a> ';Content+= ' <div id= ' navcategory ' > ';Content+= ' <p style= ' font-size:18px ><b> catalogue </b></p> ';Content+= ' <ul> ';         for(varI= 0;I< h2_list.length;I++){            varGo_to_top= ' <div style= ' text-align:right "><a href=" #_labelTop "> Back to Top </a><a name=" _label " +I+ ' ></a></div> ';            $(H2_list[i]).before(Go_to_top);            varH3_list= $(H2_list[i]).Nextall("H3");            varLi3_content= '';             for(varJ= 0;J< h3_list.length;J++){                varTmp= $(H3_list[j]).Prevall(' H2 '). First();                if(!tmp. is(H2_list[i])) Break;                varLi3_anchor= ' <a name= ' _label ' +I+ '_' +J+ ' ></a> ';                $(H3_list[j]).before(Li3_anchor);Li3_content+= ' <li><a href= ' #_label ' +I+ '_' +J+ ' > ' + $(H3_list[j]).text()+ ' </a></li> ';            }            varLi2_content= '';            if(li3_content.length > 0) li2_content= ' <li><a href= ' #_label ' +I+ ' > ' + $(H2_list[i]).text()+ ' </a><ul> ' +Li3_content+ ' </ul></li> ';            ElseLi2_content= ' <li><a href= ' #_label ' +I+ ' > ' + $(H2_list[i]).text()+ ' </a></li> ';Content+=Li2_content;        }Content+= ' </ul> ';Content+= ' </div><p>&nbsp;</p> ';Content+= ' <p style= ' font-size:18px ' ><b> body </b></p> ';        if($(' #cnblogs_post_body ').length != 0){            $($(' #cnblogs_post_body ')[0]).prepend(content);        }    }    varAllinfo= ' <p><strong> Summary series: <a href= "https://www.cnblogs.com/dotnetcrazy/p/9160514.html" target= "_blank" >https://www.cnblogs.com/dotnetcrazy/p/9160514.html</a></strong></p> ';    $(maincontent[0]).prepend(Allinfo);});
For more syntax please refer to

Https://daringfireball.net/projects/markdown/syntax

Markdown Basics (included: Anchor use, HTML, new page jump, catalog generation)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.