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.md 3.9 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. Markdown support
  2. ================
  3. `DocNet` uses markdown files as input. The markdown is parsed with the markdown parser from topten software (called '[MarkdownDeep](http://www.toptensoftware.com/markdowndeep/)'). It supports the default markdown statements as well as github style code block markers and specific extensions for writing documentation, which are described below.
  4. ##Standard Markdown
  5. The standard markdown syntax as defined by [John Gruber](https://daringfireball.net/projects/markdown/) is supported in full.
  6. ##Php Markdown Extra
  7. MarkdownDeep supports [PHP Markdown Extra](https://michelf.ca/projects/php-markdown/extra/). 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 [unit test files](https://github.com/FransBouma/DocNet/tree/master/src/MarkdownDeepTests/testfiles/extramode) for MarkdownDeep in the [DocNet respository at GitHub](https://github.com/FransBouma/DocNet).
  8. A couple of examples are given below
  9. ###Footnotes
  10. MarkdownDeep supports Footnotes, which can be added through the following system: To specify a footnote marker, specify `[^1]`, which will result in:[^1]
  11. The actual footnote text is then specified with `[^1]:` following the text of the actual footnote. Click on the superscript `1` link above to go to the footnote rendered at the bottom of this page.
  12. [^1]: And this is the footnote related to the example above.
  13. ###Definition lists
  14. To specify simple definition lists, simply do:
  15. ```
  16. Item one
  17. : this is the description of item one
  18. Item Two
  19. : this is the text of item 2
  20. ```
  21. which results in:
  22. Item one
  23. : this is the description of item one
  24. Item Two
  25. : this is the text of item 2
  26. ###Tables
  27. There's basic support for defining tables.
  28. Specifying:
  29. ```
  30. Fruit|Color
  31. --|--
  32. Apples|Red
  33. Pears|Green
  34. Bananas|Yellow
  35. 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?!
  36. ```
  37. results in:
  38. Fruit|Color
  39. --|--
  40. Apples|Red
  41. Pears|Green
  42. Bananas|Yellow
  43. 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?!
  44. ###Abbreviations
  45. There's also support for abbreviations, using the `<abbr>` HTML tag.
  46. Specifying:
  47. ```
  48. *[FuBar]: F**ked Up Beyond Any Repair.
  49. ```
  50. *[FuBar]: F**ked Up Beyond Any Repair.
  51. gives an abbreviation link in the following sentence: This is a test for abbreviations: FuBar.
  52. ##Highlighting code
  53. 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 [Highlight.js](https://highlightjs.org/) javascript library and most popular languages are included.
  54. Example: to specify a codeblock as C#, append `cs` after the first ``` marker:
  55. ```cs
  56. var i=42;
  57. ```
  58. To specify a block of text in a fixed sized font but not specify any language highlighting, specify `nohighlight` as language name:
  59. ```nohighlight
  60. this is a simple <pre> block
  61. ```
  62. ##Linking
  63. `Docnet` doesn't transform links. This means that any link to any document in your documentation has to use the url it will get in the destination folder. Example: you want to link to the file `How to\AddEntity.md` from a page. In the result site this should be the link `How%20to/AddEntity.htm`, which you should specify in your markdown. In the future it might be `docnet` will be updated with link transformation, at the moment it doesn't convert any links besides the usual markdown ones. 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 `%20`.

No Description

Contributors (1)