{"id":71,"date":"2015-11-06T16:05:19","date_gmt":"2015-11-06T08:05:19","guid":{"rendered":"http:\/\/zsaber.com\/blog\/?p=71"},"modified":"2019-08-26T15:35:00","modified_gmt":"2019-08-26T07:35:00","slug":"%e7%bb%99-markdown-%e8%87%aa%e5%8a%a8%e6%b7%bb%e5%8a%a0%e7%9b%ae%e5%bd%95","status":"publish","type":"post","link":"http:\/\/zsaber.com\/blog\/p\/71","title":{"rendered":"markdown \u4e00\u4e9b\u65b9\u4fbf\u597d\u7528\u7684\u4e1c\u897f"},"content":{"rendered":"<h1>\u81ea\u52a8\u6dfb\u52a0\u76ee\u5f55<\/h1>\n<p>\u65b9\u6cd5\u6765\u81ea<a href=\"http:\/\/www.oschina.net\/code\/snippet_929621_46406\">\u8fd9\u91cc<\/a><\/p>\n<p>\u53ea\u9700\u5728 markdown \u6587\u4ef6\u5934\u90e8\u6dfb\u52a0\u4ee5\u4e0b\u4ee3\u7801:<\/p>\n<pre><code class=\"language-html\">&lt;hr \/&gt;\n&lt;script src=&quot;http:\/\/cdn.bootcss.com\/jquery\/2.1.4\/jquery.min.js&quot;&gt;&lt;\/script&gt;\n&lt;script type=&quot;text\/javascript&quot;&gt;\n  $(document).ready(function(){\n    $(&quot;h1,h2,h3,h4,h5,h6&quot;).each(function(i,item){\n      var tag = $(item).get(0).localName;\n      $(&quot;#md_toc&quot;).append(&#039;&lt;a class=&quot;new&#039;+tag+&#039;&quot; href=&quot;#&#039;+$(item).attr(&quot;id&quot;)+&#039;&quot;&gt;&#039;+$(this).text()+&#039;&lt;\/a&gt;&lt;\/br&gt;&#039;);\n      $(&quot;.newh1&quot;).css(&quot;margin-left&quot;,20);\n      $(&quot;.newh2&quot;).css(&quot;margin-left&quot;,40);\n      $(&quot;.newh3&quot;).css(&quot;margin-left&quot;,60);\n      $(&quot;.newh4&quot;).css(&quot;margin-left&quot;,80);\n      $(&quot;.newh5&quot;).css(&quot;margin-left&quot;,100);\n      $(&quot;.newh6&quot;).css(&quot;margin-left&quot;,120);\n    });\n  });\n&lt;\/script&gt;\n&lt;div id=&quot;md_toc&quot;&gt;&lt;\/div&gt;\n&lt;hr \/&gt;<\/code><\/pre>\n<h1>\u81ea\u52a8\u9ad8\u4eae\u4ee3\u7801<\/h1>\n<p>\u65b9\u6cd5\u6765\u81ea<a href=\"http:\/\/www.ghostchina.com\/adding-syntax-highlighting-to-ghost-using-highlight-js\/\">\u8fd9\u91cc<\/a><\/p>\n<p>\u53ea\u9700\u5728 markdown \u6587\u4ef6\u5934\u90e8\u6dfb\u52a0\u4ee5\u4e0b\u4ee3\u7801:<\/p>\n<pre><code class=\"language-html\">&lt;link href=&quot;http:\/\/cdn.bootcss.com\/highlight.js\/9.11.0\/styles\/monokai.min.css&quot; rel=&quot;stylesheet&quot;&gt;\n&lt;script src=&quot;http:\/\/cdn.bootcss.com\/highlight.js\/9.11.0\/highlight.min.js&quot;&gt;&lt;\/script&gt;&lt;script &gt;hljs.initHighlightingOnLoad();&lt;\/script&gt;<\/code><\/pre>\n<h1>\u6a21\u677f<\/h1>\n<p>\u6574\u7406\u597d\u7684\u6a21\u677f, \u9002\u5408\u5199\u6587\u6863\u7528<\/p>\n<pre><code class=\"language-html\">&lt;head&gt;&lt;meta charset=&quot;UTF-8&quot;&gt;&lt;\/head&gt;\n&lt;script src=&quot;http:\/\/cdn.bootcss.com\/jquery\/2.1.4\/jquery.min.js&quot;&gt;&lt;\/script&gt;\n&lt;script type=&quot;text\/javascript&quot;&gt;$(document).ready(function(){$(&quot;h1,h2,h3,h4,h5,h6&quot;).each(function(i,item){\n    $(item).attr(&quot;id&quot;,&quot;md_&quot;+i);\n    $(&quot;#md_toc&quot;).append(&#039;&lt;a class=&quot;new&#039;+$(item).get(0).localName+&#039;&quot; href=&quot;#md_&#039;+i+&#039;&quot;&gt;&#039;+$(this).text()+&#039;&lt;\/a&gt;&lt;\/br&gt;&#039;);\n    $(&quot;.newh1&quot;).css(&quot;margin-left&quot;,20);$(&quot;.newh2&quot;).css(&quot;margin-left&quot;,40);$(&quot;.newh3&quot;).css(&quot;margin-left&quot;,60);\n    $(&quot;.newh4&quot;).css(&quot;margin-left&quot;,80);$(&quot;.newh5&quot;).css(&quot;margin-left&quot;,100);$(&quot;.newh6&quot;).css(&quot;margin-left&quot;,120);\n});});&lt;\/script&gt;\n&lt;link href=&quot;http:\/\/cdn.bootcss.com\/highlight.js\/9.11.0\/styles\/monokai.min.css&quot; rel=&quot;stylesheet&quot;&gt;\n&lt;script src=&quot;http:\/\/cdn.bootcss.com\/highlight.js\/9.11.0\/highlight.min.js&quot;&gt;&lt;\/script&gt;&lt;script &gt;hljs.initHighlightingOnLoad();&lt;\/script&gt;\n&lt;style type=&quot;text\/css&quot;&gt;#md_container {width:100%;height:100%;float:left;}\n#md_sidebar {width:25%;height:100%;float:left;overflow:auto;border:1px solid black;margin:-1px;}\n#md_content {width:75%;height:100%;float:left;overflow:auto;}&lt;\/style&gt;\n&lt;div id=&quot;md_container&quot;&gt;\n&lt;div id=&quot;md_sidebar&quot;&gt;&lt;nobr&gt;&lt;div id=&quot;md_toc&quot; style=&quot;padding:5px;&quot;&gt;&lt;\/div&gt;&lt;\/nobr&gt;&lt;\/div&gt;\n&lt;div id=&quot;md_content&quot;&gt;&lt;div style=&quot;padding:10px;&quot;&gt;<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u81ea\u52a8\u6dfb\u52a0\u76ee\u5f55 \u65b9\u6cd5\u6765\u81ea\u8fd9\u91cc \u53ea\u9700\u5728 markdown \u6587\u4ef6\u5934\u90e8\u6dfb\u52a0\u4ee5\u4e0b\u4ee3\u7801: &lt;hr \/&gt; &#038;lt\u2026 <span class=\"read-more\"><a href=\"http:\/\/zsaber.com\/blog\/p\/71\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,11],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>markdown \u4e00\u4e9b\u65b9\u4fbf\u597d\u7528\u7684\u4e1c\u897f - \u67d0Z\u7684\u535a\u5ba2<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/zsaber.com\/blog\/p\/71\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"markdown \u4e00\u4e9b\u65b9\u4fbf\u597d\u7528\u7684\u4e1c\u897f - \u67d0Z\u7684\u535a\u5ba2\" \/>\n<meta property=\"og:description\" content=\"\u81ea\u52a8\u6dfb\u52a0\u76ee\u5f55 \u65b9\u6cd5\u6765\u81ea\u8fd9\u91cc \u53ea\u9700\u5728 markdown \u6587\u4ef6\u5934\u90e8\u6dfb\u52a0\u4ee5\u4e0b\u4ee3\u7801: &lt;hr \/&gt; &amp;lt\u2026 Read More &raquo;\" \/>\n<meta property=\"og:url\" content=\"http:\/\/zsaber.com\/blog\/p\/71\" \/>\n<meta property=\"og:site_name\" content=\"\u67d0Z\u7684\u535a\u5ba2\" \/>\n<meta property=\"article:published_time\" content=\"2015-11-06T08:05:19+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-08-26T07:35:00+00:00\" \/>\n<meta name=\"author\" content=\"Z\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"Z\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"http:\/\/zsaber.com\/blog\/p\/71#article\",\"isPartOf\":{\"@id\":\"http:\/\/zsaber.com\/blog\/p\/71\"},\"author\":{\"name\":\"Z\",\"@id\":\"http:\/\/zsaber.com\/blog\/#\/schema\/person\/6a6701fc719eff087e24e39a00e2280f\"},\"headline\":\"markdown \u4e00\u4e9b\u65b9\u4fbf\u597d\u7528\u7684\u4e1c\u897f\",\"datePublished\":\"2015-11-06T08:05:19+00:00\",\"dateModified\":\"2019-08-26T07:35:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\/\/zsaber.com\/blog\/p\/71\"},\"wordCount\":3,\"commentCount\":0,\"publisher\":{\"@id\":\"http:\/\/zsaber.com\/blog\/#\/schema\/person\/6a6701fc719eff087e24e39a00e2280f\"},\"articleSection\":[\"\u6548\u7387\",\"\u957f\u671f\u66f4\u65b0\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"http:\/\/zsaber.com\/blog\/p\/71#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/zsaber.com\/blog\/p\/71\",\"url\":\"http:\/\/zsaber.com\/blog\/p\/71\",\"name\":\"markdown \u4e00\u4e9b\u65b9\u4fbf\u597d\u7528\u7684\u4e1c\u897f - \u67d0Z\u7684\u535a\u5ba2\",\"isPartOf\":{\"@id\":\"http:\/\/zsaber.com\/blog\/#website\"},\"datePublished\":\"2015-11-06T08:05:19+00:00\",\"dateModified\":\"2019-08-26T07:35:00+00:00\",\"breadcrumb\":{\"@id\":\"http:\/\/zsaber.com\/blog\/p\/71#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/zsaber.com\/blog\/p\/71\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/zsaber.com\/blog\/p\/71#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"http:\/\/zsaber.com\/blog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"markdown \u4e00\u4e9b\u65b9\u4fbf\u597d\u7528\u7684\u4e1c\u897f\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/zsaber.com\/blog\/#website\",\"url\":\"http:\/\/zsaber.com\/blog\/\",\"name\":\"\u67d0Z\u7684\u535a\u5ba2\",\"description\":\"\u7b80\u4ecb\u53c8\u4e0d\u80fd\u5403\",\"publisher\":{\"@id\":\"http:\/\/zsaber.com\/blog\/#\/schema\/person\/6a6701fc719eff087e24e39a00e2280f\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/zsaber.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"http:\/\/zsaber.com\/blog\/#\/schema\/person\/6a6701fc719eff087e24e39a00e2280f\",\"name\":\"Z\",\"logo\":{\"@id\":\"http:\/\/zsaber.com\/blog\/#\/schema\/person\/image\/\"},\"description\":\"\u67d0Z\",\"sameAs\":[\"http:\/\/ZFFramework.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"markdown \u4e00\u4e9b\u65b9\u4fbf\u597d\u7528\u7684\u4e1c\u897f - \u67d0Z\u7684\u535a\u5ba2","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/zsaber.com\/blog\/p\/71","og_locale":"zh_CN","og_type":"article","og_title":"markdown \u4e00\u4e9b\u65b9\u4fbf\u597d\u7528\u7684\u4e1c\u897f - \u67d0Z\u7684\u535a\u5ba2","og_description":"\u81ea\u52a8\u6dfb\u52a0\u76ee\u5f55 \u65b9\u6cd5\u6765\u81ea\u8fd9\u91cc \u53ea\u9700\u5728 markdown \u6587\u4ef6\u5934\u90e8\u6dfb\u52a0\u4ee5\u4e0b\u4ee3\u7801: &lt;hr \/&gt; &lt\u2026 Read More &raquo;","og_url":"http:\/\/zsaber.com\/blog\/p\/71","og_site_name":"\u67d0Z\u7684\u535a\u5ba2","article_published_time":"2015-11-06T08:05:19+00:00","article_modified_time":"2019-08-26T07:35:00+00:00","author":"Z","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"Z","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/zsaber.com\/blog\/p\/71#article","isPartOf":{"@id":"http:\/\/zsaber.com\/blog\/p\/71"},"author":{"name":"Z","@id":"http:\/\/zsaber.com\/blog\/#\/schema\/person\/6a6701fc719eff087e24e39a00e2280f"},"headline":"markdown \u4e00\u4e9b\u65b9\u4fbf\u597d\u7528\u7684\u4e1c\u897f","datePublished":"2015-11-06T08:05:19+00:00","dateModified":"2019-08-26T07:35:00+00:00","mainEntityOfPage":{"@id":"http:\/\/zsaber.com\/blog\/p\/71"},"wordCount":3,"commentCount":0,"publisher":{"@id":"http:\/\/zsaber.com\/blog\/#\/schema\/person\/6a6701fc719eff087e24e39a00e2280f"},"articleSection":["\u6548\u7387","\u957f\u671f\u66f4\u65b0"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["http:\/\/zsaber.com\/blog\/p\/71#respond"]}]},{"@type":"WebPage","@id":"http:\/\/zsaber.com\/blog\/p\/71","url":"http:\/\/zsaber.com\/blog\/p\/71","name":"markdown \u4e00\u4e9b\u65b9\u4fbf\u597d\u7528\u7684\u4e1c\u897f - \u67d0Z\u7684\u535a\u5ba2","isPartOf":{"@id":"http:\/\/zsaber.com\/blog\/#website"},"datePublished":"2015-11-06T08:05:19+00:00","dateModified":"2019-08-26T07:35:00+00:00","breadcrumb":{"@id":"http:\/\/zsaber.com\/blog\/p\/71#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["http:\/\/zsaber.com\/blog\/p\/71"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/zsaber.com\/blog\/p\/71#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"http:\/\/zsaber.com\/blog"},{"@type":"ListItem","position":2,"name":"markdown \u4e00\u4e9b\u65b9\u4fbf\u597d\u7528\u7684\u4e1c\u897f"}]},{"@type":"WebSite","@id":"http:\/\/zsaber.com\/blog\/#website","url":"http:\/\/zsaber.com\/blog\/","name":"\u67d0Z\u7684\u535a\u5ba2","description":"\u7b80\u4ecb\u53c8\u4e0d\u80fd\u5403","publisher":{"@id":"http:\/\/zsaber.com\/blog\/#\/schema\/person\/6a6701fc719eff087e24e39a00e2280f"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/zsaber.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":["Person","Organization"],"@id":"http:\/\/zsaber.com\/blog\/#\/schema\/person\/6a6701fc719eff087e24e39a00e2280f","name":"Z","logo":{"@id":"http:\/\/zsaber.com\/blog\/#\/schema\/person\/image\/"},"description":"\u67d0Z","sameAs":["http:\/\/ZFFramework.com"]}]}},"_links":{"self":[{"href":"http:\/\/zsaber.com\/blog\/wp-json\/wp\/v2\/posts\/71"}],"collection":[{"href":"http:\/\/zsaber.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/zsaber.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/zsaber.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/zsaber.com\/blog\/wp-json\/wp\/v2\/comments?post=71"}],"version-history":[{"count":0,"href":"http:\/\/zsaber.com\/blog\/wp-json\/wp\/v2\/posts\/71\/revisions"}],"wp:attachment":[{"href":"http:\/\/zsaber.com\/blog\/wp-json\/wp\/v2\/media?parent=71"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/zsaber.com\/blog\/wp-json\/wp\/v2\/categories?post=71"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/zsaber.com\/blog\/wp-json\/wp\/v2\/tags?post=71"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}