You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

markdownsupport.htm 14 kB

8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
5 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. <!DOCTYPE html>
  2. <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
  3. <!--[if gt IE 8]><!-->
  4. <html class="no-js" lang="en">
  5. <!--<![endif]-->
  6. <head>
  7. <meta charset="utf-8">
  8. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  9. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  10. <title>Markdown support - DocNet Documentation</title>
  11. <link rel="shortcut icon" href="favicon.ico">
  12. <link rel="stylesheet" href="css/theme.css" type="text/css" />
  13. <link rel="stylesheet" href="css/theme_colors.css" type="text/css" />
  14. <link rel="stylesheet" href="css/styles/vs.css">
  15. <link rel="stylesheet" href="css/font-awesome.4.5.0.min.css">
  16. </head>
  17. <body role="document">
  18. <div class="grid-for-nav">
  19. <nav data-toggle="nav-shift" class="nav-side stickynav">
  20. <div class="side-nav-search">
  21. <a href="index.htm"><i class="fa fa-home"></i> DocNet Documentation</a>
  22. <div role="search">
  23. <form id="search-form" class="form" action="Docnet_search.htm" method="get">
  24. <input type="text" name="q" placeholder="Search docs" />
  25. </form>
  26. </div>
  27. </div>
  28. <div class="menu menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
  29. <ul>
  30. <li class="tocentry"><a href="index.htm">Home</a>
  31. </li>
  32. <li class="tocentry"><a href="usage.htm">Usage</a>
  33. </li>
  34. <li class="tocentry">
  35. <span class="navigationgroup"><i class="fa fa-caret-right"></i> <a href="Configuration.htm">Configuration</a></span>
  36. </li>
  37. <li class="tocentry">
  38. <ul>
  39. <li><span class="navigationgroup"><i class="fa fa-caret-down"></i> <a href="Authoringcontent.htm">Authoring content</a></span></li>
  40. <li class="tocentry"><a href="themes.htm">Themes</a>
  41. </li>
  42. <li class="tocentry">
  43. <ul>
  44. <li><span class="navigationgroup"><i class="fa fa-caret-down"></i> <a href="WritingcontentusingMarkdown.htm">Writing content using Markdown</a></span></li>
  45. <li class="tocentry current"><a class="current" href="markdownsupport.htm">Markdown support</a>
  46. <ul class="currentrelative">
  47. <li class="tocentry"><a href="#standard-markdown">Standard Markdown</a></li>
  48. <li class="tocentry"><a href="#php-markdown-extra">Php Markdown Extra</a></li>
  49. <li class="tocentry">
  50. <ul class="currentrelative">
  51. <li class="tocentry"><a href="#footnotes">Footnotes</a></li>
  52. <li class="tocentry"><a href="#definition-lists">Definition lists</a></li>
  53. <li class="tocentry"><a href="#tables">Tables</a></li>
  54. <li class="tocentry"><a href="#special-attributes">Special attributes</a></li>
  55. <li class="tocentry"><a href="#image-rendering">Image rendering</a></li>
  56. <li class="tocentry"><a href="#abbreviations">Abbreviations</a></li>
  57. </ul>
  58. </li>
  59. <li class="tocentry"><a href="#highlighting-code">Highlighting code</a></li>
  60. <li class="tocentry"><a href="#linking">Linking</a></li>
  61. </ul>
  62. <li class="tocentry"><a href="markdownextensions.htm">DocNet Markdown extensions</a>
  63. </li>
  64. </ul>
  65. </li>
  66. </ul>
  67. </li>
  68. <li class="tocentry"><a href="search.htm">Search</a>
  69. </li>
  70. <li class="tocentry"><a href="acknowledgements.htm">Acknowledgements</a>
  71. </li>
  72. <li class="tocentry"><a href="license.htm">License</a>
  73. </li>
  74. </ul>
  75. <div class="toc-footer">
  76. <span class="text-small">
  77. <hr/>
  78. <a href="https://github.com/FransBouma/DocNet" target="_blank">Made with <i class="fa fa-github"></i> DocNet</a>
  79. </span>
  80. </div>
  81. </div>
  82. &nbsp;
  83. </nav>
  84. <section data-toggle="nav-shift" class="nav-content-wrap">
  85. <nav class="nav-top" role="navigation" aria-label="top navigation">
  86. <i data-toggle="nav-top" class="fa fa-bars"></i>
  87. <a href="index.htm">DocNet Documentation</a>
  88. </nav>
  89. <div class="nav-content">
  90. <div role="navigation" aria-label="breadcrumbs navigation">
  91. <div class="breadcrumbs">
  92. <ul><li><a href="index.htm">Home</a></li> / <li><a href="Authoringcontent.htm">Authoring content</a></li> / <li><a href="WritingcontentusingMarkdown.htm">Writing content using Markdown</a></li> / <li><a href="markdownsupport.htm">Markdown support</a></li></ul>
  93. </div>
  94. <hr />
  95. </div>
  96. <div role="main">
  97. <div class="section">
  98. <h1 id="markdown-support">Markdown support<a class="headerlink" href="#markdown-support" title="Permalink to this headline"><i class="fa fa-link" aria-hidden="true"></i></a></h1>
  99. <p><code>DocNet</code> uses markdown files as input. The markdown is parsed with the markdown parser from topten software (called '<a href="http://www.toptensoftware.com/markdowndeep/" target="_blank">MarkdownDeep</a>'). It supports the default markdown statements as well as github style code block markers and specific extensions for writing documentation, which are described below.</p>
  100. <h2 id="standard-markdown">Standard Markdown<a class="headerlink" href="#standard-markdown" title="Permalink to this headline"><i class="fa fa-link" aria-hidden="true"></i></a></h2>
  101. <p>The standard markdown syntax as defined by <a href="https://daringfireball.net/projects/markdown/" target="_blank">John Gruber</a> is supported in full. </p>
  102. <h2 id="php-markdown-extra">Php Markdown Extra<a class="headerlink" href="#php-markdown-extra" title="Permalink to this headline"><i class="fa fa-link" aria-hidden="true"></i></a></h2>
  103. <p>MarkdownDeep supports <a href="https://michelf.ca/projects/php-markdown/extra/" target="_blank">PHP Markdown Extra</a>. PHP Markdown Extra comes with a set of neat extensions for markdown to define e.g. tables, footnotes and more. Please see the link above for all the syntax examples. Additionally, you can look at the <a href="https://github.com/FransBouma/DocNet/tree/master/src/MarkdownDeepTests/testfiles/extramode" target="_blank">unit test files</a> for MarkdownDeep in the <a href="https://github.com/FransBouma/DocNet" target="_blank">DocNet respository at GitHub</a>. </p>
  104. <p>A couple of examples are given below</p>
  105. <h3 id="footnotes">Footnotes<a class="headerlink" href="#footnotes" title="Permalink to this headline"><i class="fa fa-link" aria-hidden="true"></i></a></h3>
  106. <p>MarkdownDeep supports Footnotes, which can be added through the following system: To specify a footnote marker, specify <code>[^1]</code>, which will result in:<sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup></p>
  107. <p>The actual footnote text is then specified with <code>[^1]:</code> following the text of the actual footnote. Click on the superscript <code>1</code> link above to go to the footnote rendered at the bottom of this page. </p>
  108. <h3 id="definition-lists">Definition lists<a class="headerlink" href="#definition-lists" title="Permalink to this headline"><i class="fa fa-link" aria-hidden="true"></i></a></h3>
  109. <p>To specify simple definition lists, simply do:</p>
  110. <pre class="nocode">Item one
  111. : this is the description of item one
  112. Item Two
  113. : this is the text of item 2
  114. </pre><p>which results in: </p>
  115. <dl>
  116. <dt>Item one</dt>
  117. <dd>this is the description of item one</dd>
  118. <dt>Item Two</dt>
  119. <dd>this is the text of item 2</dd>
  120. </dl>
  121. <h3 id="tables">Tables<a class="headerlink" href="#tables" title="Permalink to this headline"><i class="fa fa-link" aria-hidden="true"></i></a></h3>
  122. <p>There's basic support for defining tables. </p>
  123. <p>Specifying: </p>
  124. <pre class="nocode">Fruit|Color
  125. --|--
  126. Apples|Red
  127. Pears|Green
  128. Bananas|Yellow
  129. Bongo|Bongo... it's a strange color, do you have a minute? It's a bit like the sea, but also a bit like the beach. You know how it is... oh and a bit like the wind too? You see it? Hey! Where're you going?!
  130. </pre><p>results in:</p>
  131. <table class="table table-bordered-all table-responsive">
  132. <thead>
  133. <tr>
  134. <th>Fruit</th>
  135. <th>Color</th>
  136. </tr>
  137. </thead>
  138. <tbody>
  139. <tr>
  140. <td>Apples</td>
  141. <td>Red</td>
  142. </tr>
  143. <tr>
  144. <td>Pears</td>
  145. <td>Green</td>
  146. </tr>
  147. <tr>
  148. <td>Bananas</td>
  149. <td>Yellow</td>
  150. </tr>
  151. <tr>
  152. <td>Bongo</td>
  153. <td>Bongo... it's a strange color, do you have a minute? It's a bit like the sea, but also a bit like the beach. You know how it is... oh and a bit like the wind too? You see it? Hey! Where're you going?!</td>
  154. </tr>
  155. </tbody>
  156. </table>
  157. <h3 id="special-attributes">Special attributes<a class="headerlink" href="#special-attributes" title="Permalink to this headline"><i class="fa fa-link" aria-hidden="true"></i></a></h3>
  158. <p>DocNet supports special attributes for Links and Images. Currently this is supported on normal links/image specifications only, e.g.:</p>
  159. <pre class="nocode">![id text](imageurl){.cssclass1 .cssclass2 #idvalue name=value}
  160. </pre><p>which will result in:</p>
  161. <pre><code class="html">&lt;img src=&quot;imageurl&quot; alt=&quot;id text&quot; id=&quot;idvalue&quot; class=&quot;cssclass1 cssclass2&quot; name=&quot;value&quot; /&gt;
  162. </code></pre>
  163. <h3 id="image-rendering">Image rendering<a class="headerlink" href="#image-rendering" title="Permalink to this headline"><i class="fa fa-link" aria-hidden="true"></i></a></h3>
  164. <p>By default images have no special rendering applied to them. To apply a shadow, specify '.shadowed' as css class in a special attribute specification.
  165. If you want to have an image rendered centered with a note below it, simply specify a title for the image: </p>
  166. <pre class="nocode">![](mycenteredpicture.jpg &quot;this is a picture&quot;)
  167. </pre><p>will be rendered as: (xxx and yyy are the width/height values of mycenteredpicture.jpg)</p>
  168. <pre><code class="html">&lt;div class=&quot;figure&quot;&gt;
  169. &lt;img src=&quot;mycenteredpicture.jpg&quot; title=&quot;this is a picture&quot; width=&quot;xxx&quot; height=&quot;yyy&quot;/&gt;
  170. &lt;p&gt;this is a picture&lt;/p&gt;
  171. &lt;/div&gt;
  172. </code></pre>
  173. <p>All images rendered contain the width/height of the picture file included in the html.</p>
  174. <h3 id="abbreviations">Abbreviations<a class="headerlink" href="#abbreviations" title="Permalink to this headline"><i class="fa fa-link" aria-hidden="true"></i></a></h3>
  175. <p>There's also support for abbreviations, using the <code>&lt;abbr&gt;</code> HTML tag. </p>
  176. <p>Specifying:</p>
  177. <pre class="nocode">*[FuBar]: F**ked Up Beyond Any Repair.
  178. </pre><p>gives an abbreviation link in the following sentence: This is a test for abbreviations: <abbr title="F**ked Up Beyond Any Repair.">FuBar</abbr>.</p>
  179. <h2 id="highlighting-code">Highlighting code<a class="headerlink" href="#highlighting-code" title="Permalink to this headline"><i class="fa fa-link" aria-hidden="true"></i></a></h2>
  180. <p>The markdown parser has been extended with GitHub code specifications, so it's easy to specify a specific code beautifying based on a language. This feature uses the <a href="https://highlightjs.org/" target="_blank">Highlight.js</a> javascript library and most popular languages are included. </p>
  181. <p>Example: to specify a codeblock as C#, append <code>cs</code> after the first ``` marker:</p>
  182. <pre><code class="cs">var i=42;
  183. </code></pre>
  184. <p>To specify a block of text in a fixed sized font but not specify any language highlighting, specify <code>nohighlight</code> as language name:</p>
  185. <pre class="nocode">this is a simple &lt;pre&gt; block
  186. </pre><h2 id="linking">Linking<a class="headerlink" href="#linking" title="Permalink to this headline"><i class="fa fa-link" aria-hidden="true"></i></a></h2>
  187. <p><code>Docnet</code> doesn't automatically transform links to markdown files by default. To enable automatic link conversion to local markdown files, please specify the <code>ConvertLocalLinks</code> option in the <a href="docnetjson.htm">docnet.json file</a> file with the value <code>true</code>. If <code>ConvertLocalLinks</code> isn't specified or set to <code>false</code>, any link to any document in your documentation has to use the url it will get in the destination folder. </p>
  188. <p>Example: you want to link to the file <code>How to\AddEntity.md</code> from a page. If <code>ConvertLocalLinks</code> isn't specified or set to <code>false</code>, you have to specify in the markdown the url it will need to be in the result site, which is the link <code>How%20to/AddEntity.htm</code>. If <code>ConvertLocalLinks</code> is set to <code>true</code>, you can specify <code>How%20to/AddEntity.md</code> and DocNet will convert it to <code>How%20to/AddEntity.htm</code>.</p>
  189. <div class="alert alert-warning"><span class="alert-title"><i class="fa fa-warning"></i> Important!</span><p>The markdown parser also doesn't allow spaces to be present in the urls. If you need a space in the url, escape it with <code>%20</code>. </p>
  190. </div>
  191. <div class="footnotes">
  192. <hr />
  193. <ol>
  194. <li id="fn:1">
  195. <p>And this is the footnote related to the example above.&nbsp;<a href="#fnref:1" rev="footnote">&#8617;</a></p>
  196. </li>
  197. </ol>
  198. </div>
  199. </div>
  200. </div>
  201. <footer>
  202. <hr />
  203. <div role="contentinfo">
  204. Made with DocNet. Get your copy at: <a href='https://github.com/FransBouma/DocNet' target='_blank'>https://github.com/FransBouma/DocNet</a>.
  205. </div>
  206. </footer>
  207. </div>
  208. </section>
  209. </div>
  210. <script src="js/jquery-2.1.1.min.js"></script>
  211. <script src="js/modernizr-2.8.3.min.js"></script>
  212. <script src="js/highlight.pack.js"></script>
  213. <script src="js/theme.js"></script>
  214. </body>
  215. </html>