1
0

markdown.rst 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. Using Markdown in Pagure
  2. ========================
  3. Pagure uses `Markdown syntax highlighting
  4. <https://daringfireball.net/projects/markdown/syntax>`_ as the base for
  5. formatting comments in issues, pull requests, and in Markdown files in
  6. repositories. For basic formatting, Pagure follows common Markdown
  7. formatting, but it also has some unique syntax for more advanced
  8. formatting. This help page helps demonstrate how to use Markdown in Pagure.
  9. Pagure relies on the `Markdown <http://pythonhosted.org/Markdown/>`_ python
  10. module to do the convertion.
  11. It has enabled a few extensions:
  12. - `Definition Lists <http://pythonhosted.org/Markdown/extensions/definition_lists.html>`_
  13. - `Fenced Code Blocks <http://pythonhosted.org/Markdown/extensions/fenced_code_blocks.html>`_
  14. - `Tables <http://pythonhosted.org/Markdown/extensions/tables.html>`_
  15. - `Smart Strong <http://pythonhosted.org/Markdown/extensions/smart_strong.html>`_
  16. - `Admonition <http://pythonhosted.org/Markdown/extensions/admonition.html>`_
  17. - `CodeHilite <http://pythonhosted.org/Markdown/extensions/code_hilite.html>`_
  18. - `Sane lists <http://pythonhosted.org/Markdown/extensions/sane_lists.html>`_
  19. README files can also rely on:
  20. - `Abbreviations <http://pythonhosted.org/Markdown/extensions/abbreviations.html>`_
  21. - `Foonotes <http://pythonhosted.org/Markdown/extensions/footnotes.html>`_
  22. - `Table of Contents <http://pythonhosted.org/Markdown/extensions/toc.html>`_
  23. While comments use:
  24. - `New Line to Break <http://pythonhosted.org/Markdown/extensions/nl2br.html>`_
  25. Styling
  26. -------
  27. .. role:: strike
  28. :class: strike
  29. You can mark up text with bold, italics, or strikethrough.
  30. * **Style**: Bold
  31. * Syntax: `** **` or `__ __`
  32. * Example: `**This is bold text**`
  33. * Output: **This is bold text**
  34. * **Style**: Italics
  35. * Syntax: `* *` or `_ _`
  36. * Example: `_This is italicized text_`
  37. * Output: *This is italicized text*
  38. * **Style**: Strikethrough
  39. * Syntax: `~~ ~~`
  40. * Example: `~~This text is no longer relevant~~`
  41. * Output: :strike:`This text is no longer relevant`
  42. * **Style**: Bold and italics
  43. * Syntax: `** **` and `_ _`
  44. * Example: `** This text is the _most important thing ever_ **`
  45. * Output: ** This text is the *most important thing ever* **
  46. Quoting
  47. -------
  48. You can show text as being quoted with the `>` character.
  49. ::
  50. Before merging this pull request, remember Clark Kent mentioned this:
  51. > Double-check there's no reference to the Kryptonite library in the program since we removed that a few versions ago.
  52. Before merging this pull request, remember Clark Kent mentioned this:
  53. > Double-check there's no reference to the Kryptonite library in the program since we removed that a few versions ago.
  54. Code
  55. ----
  56. You can highlight parts of a line as code or create entire code blocks in
  57. your Markdown documents. You can do this with the backtick character (`).
  58. Text inside of backticks will not be formatted.
  59. ::
  60. When running the program for the first time, use `superman --initialize`.
  61. When running the program for the first time, use ``superman --initialize``.
  62. To format multiple lines of code into its own block, you can wrap the text
  63. block with four tilde (~) characters
  64. ::
  65. Install the needed system libraries:
  66. `~~~~`
  67. sudo dnf install git python-virtualenv libgit2-devel \
  68. libjpeg-devel gcc libffi-devel redhat-rpm-config
  69. `~~~~`
  70. Install the needed system libraries:
  71. ::
  72. sudo dnf install git python-virtualenv libgit2-devel \
  73. libjpeg-devel gcc libffi-devel redhat-rpm-config
  74. Hyperlinks
  75. ----------
  76. Need to embed a link to somewhere else? No problem! You can create an
  77. in-line link by wrapping the text in `[ ]` and appending the the URL in
  78. parentheses `( )` immediately after.
  79. `Pagure is used by the [Fedora Project](https://fedoraproject.org).`
  80. Pagure is used by the `Fedora Project <https://fedoraproject.org>`_.
  81. Lists
  82. -----
  83. Unordered lists
  84. ^^^^^^^^^^^^^^^
  85. You can make unordered lists spanning multiple lines with either `-` or `*`.
  86. ::
  87. * Superman
  88. * Batman
  89. * Protector of Gotham City!
  90. * Superwoman
  91. * Harley Quinn
  92. * Something on this list is unlike the others...
  93. * Superman
  94. * Batman
  95. * Protector of Gotham City!
  96. * Superwoman
  97. * Harley Quinn
  98. * Something on this list is unlike the others...
  99. Ordered lists
  100. ^^^^^^^^^^^^^
  101. You can make ordered lists by preceding each line with a number.
  102. ::
  103. 1. Superman
  104. 2. Batman
  105. 1. Protector of Gotham City!
  106. 2. He drives the Batmobile!
  107. 3. Superwoman
  108. 4. Harley Quinn
  109. 1. Something on this list is unlike the others...
  110. 2. Somebody evil lurks on this list!
  111. 1. Superman
  112. 2. Batman
  113. 1. Protector of Gotham City!
  114. 2. He drives the Batmobile!
  115. 3. Superwoman
  116. 4. Harley Quinn
  117. 1. Something on this list is unlike the others...
  118. 2. Somebody evil lurks on this list!
  119. Tagging users
  120. -------------
  121. You can tag other users on Pagure to send them a notification about an issue
  122. or pull request. To tag a user, use the `@` symbol followed by their username.
  123. Typing the `@` symbol in a comment will bring up a list of users that match
  124. the username. The list searches as you type. Once you see the name of the
  125. person you are looking for, you can click their name to automatically
  126. complete the tag.
  127. `@jflory7, could you please review this pull request and leave feedback?`
  128. `@jflory7 <https://pagure.io/user/jflory7>`_, could you please review this pull request and leave feedback?
  129. Tagging issues or pull requests
  130. -------------------------------
  131. In a comment, you can automatically link a pull request or issue by its number.
  132. To link it, use the `#` character followed by its number. Like with tagging
  133. users, Pagure will provide suggestions for issues or pull requests as you
  134. type the number. You can select the issue in the drop-down to automatically
  135. tag the issue or pull request.
  136. If you need to tag an issue or pull request that is outside of the current
  137. project, you are also able to do this. For cross-projects links, you can tag
  138. them by typing `<project name>#id` or `<username>/<project name>#id`.
  139. Emoji
  140. -----
  141. Pagure natively supports emoji characters. To use emoji, you can use two
  142. colons wrapped around the emoji keyword (`:emoji:`). Typing a colon by itself
  143. will bring up a list of suggested emoji with a small preview. If you see the
  144. one you're looking for, you can click it to automatically complete the emoji.
  145. `I reviewed the PR and it looks good to me. :+1: Good to merge! :clapper:`
  146. I reviewed the PR and it looks good to me. 👍 Good to merge! 🎬
  147. Improve this documentation!
  148. ---------------------------
  149. Notice anything that can be improved in this documentation? Find a mistake?
  150. You can improve this page! Find it in the official
  151. `Pagure repository <https://pagure.io/pagure/blob/master/f/doc/usage/markdown.md>`_.