1 # Markdown Quickstart Template
3 ## Introduction and Quickstart
5 This document is meant to get you writing documentation as fast as possible
6 even if you have no previous experience with Markdown. The goal is to take
7 someone in the state of "I want to write documentation and get it added to
8 LLVM's docs" and turn that into useful documentation mailed to llvm-commits
9 with as little nonsense as possible.
11 You can find this document in `docs/MarkdownQuickstartTemplate.md`. You
12 should copy it, open the new file in your text editor, write your docs, and
13 then send the new document to llvm-commits for review.
15 Focus on *content*. It is easy to fix the Markdown syntax
16 later if necessary, although Markdown tries to imitate common
17 plain-text conventions so it should be quite natural. A basic knowledge of
18 Markdown syntax is useful when writing the document, so the last
19 ~half of this document (starting with [Example Section](#example-section)) gives examples
20 which should cover 99% of use cases.
22 Let me say that again: focus on *content*. But if you really need to verify
23 Sphinx's output, see `docs/README.txt` for information.
25 Once you have finished with the content, please send the `.md` file to
26 llvm-commits for review.
30 Try to answer the following questions in your first section:
32 1. Why would I want to read this document?
34 2. What should I know to be able to follow along with this document?
36 3. What will I have learned by the end of this document?
38 Common names for the first section are `Introduction`, `Overview`, or
41 If possible, make your document a "how to". Give it a name `HowTo*.md`
42 like the other "how to" documents. This format is usually the easiest
43 for another person to understand and also the most useful.
45 You generally should not be writing documentation other than a "how to"
46 unless there is already a "how to" about your topic. The reason for this
47 is that without a "how to" document to read first, it is difficult for a
48 person to understand a more advanced document.
50 Focus on content (yes, I had to say it again).
52 The rest of this document shows example Markdown markup constructs
53 that are meant to be read by you in your text editor after you have copied
54 this file into a new file for the documentation you are about to write.
58 Your text can be *emphasized*, **bold**, or `monospace`.
60 Use blank lines to separate paragraphs.
62 Headings (like `Example Section` just above) give your document its
65 ### Example Subsection
67 Make a link [like this](http://llvm.org/). There is also a more
68 sophisticated syntax which [can be more readable] for longer links since
69 it disrupts the flow less. You can put the `[link name]: <URL>` block
70 pretty much anywhere later in the document.
72 [can be more readable]: http://en.wikipedia.org/wiki/LLVM
74 Lists can be made like this:
76 1. A list starting with `[0-9].` will be automatically numbered.
78 1. This is a second list element.
80 1. Use indentation to create nested lists.
82 You can also use unordered lists.
90 #### Example Subsubsection
92 You can make blocks of code like this:
100 As an extension to markdown, you can also specify a highlighter to use.
108 For a shell session, use a `console` code block.
111 $ echo "Goodbye cruel world!"
115 If you need to show LLVM IR use the `llvm` code block.
118 define i32 @test1() {
124 Some other common code blocks you might need are `c`, `objc`, `make`,
125 and `cmake`. If you need something beyond that, you can look at the [full
126 list] of supported code blocks.
128 [full list]: http://pygments.org/docs/lexers/
130 However, don't waste time fiddling with syntax highlighting when you could
131 be adding meaningful content. When in doubt, show preformatted text
132 without any syntax highlighting like this:
150 ##### Hopefully you won't need to be this deep
152 If you need to do fancier things than what has been shown in this document,
153 you can mail the list or check the [Common Mark spec]. Sphinx specific
154 integration documentation can be found in the [recommonmark docs].
156 [Common Mark spec]: http://spec.commonmark.org/0.28/
157 [recommonmark docs]: http://recommonmark.readthedocs.io/en/latest/index.html