Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Side by Side Diff: native_client_sdk/src/doc/rest-devsite-examples.rst

Issue 180003003: [NaCl SDK Docs] Fix README, cleanup Makefile, remove devsite stuff. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 .. _getting_started: 1 .. _getting_started:
2 2
3 :orphan: 3 :orphan:
4 4
5 #################################################### 5 #######################################################
6 Examples of ReST markup for devsite (Document title) 6 Examples of ReST markup for chromesite (Document title)
7 #################################################### 7 #######################################################
8
9 This is an auto-generated table of contents for this document. ``:local:`` and
10 ``:backlinks: none`` are required to make the devsite look consistent;
11 ``:depth:`` level can be controlled.
12
13 .. contents::
14 :local:
15 :backlinks: none
16 :depth: 2
17 8
18 Document structure 9 Document structure
19 ================== 10 ==================
20 11
21 A document starts with a Sphinx target which serves as the document name 12 A document starts with a Sphinx target which serves as the document name
22 throughout the tree. It can serve as a link target in other documents that want 13 throughout the tree. It can serve as a link target in other documents that want
23 to link to this one (see the Links section below). 14 to link to this one (see the Links section below).
24 15
25 It follows with the document title (which doesn't get generated to the HTML body
26 in production mode, but is picked up by the devsite from ``<head><title>``.
27
28 Basic markup 16 Basic markup
29 ============ 17 ============
30 18
31 In general, follow the rules from http://sphinx-doc.org/rest.html 19 In general, follow the rules from http://sphinx-doc.org/rest.html
32 20
33 Some **bold text** and *italic text* and ``fixed-font text``. Non marked-up text 21 Some **bold text** and *italic text* and ``fixed-font text``. Non marked-up text
34 can follow these immediately by using a backslash: **pexe**\s. 22 can follow these immediately by using a backslash: **pexe**\s.
35 23
36 For pleasant collaborative editing, please use the accepted coding guidelines: 24 For pleasant collaborative editing, please use the accepted coding guidelines:
37 wrap at 80 columns, no tabs, etc. 25 wrap at 80 columns, no tabs, etc.
(...skipping 22 matching lines...) Expand all
60 48
61 .. image:: /images/NaclBlock.png 49 .. image:: /images/NaclBlock.png
62 50
63 Links 51 Links
64 ===== 52 =====
65 53
66 To other documents within the tree 54 To other documents within the tree
67 ---------------------------------- 55 ----------------------------------
68 56
69 Internal links to other documents are created :doc:`like this <overview>`. The 57 Internal links to other documents are created :doc:`like this <overview>`. The
70 document name within the angle brackets is relative to the root dir of the 58 document name within the angle brackets is relative to the root dir of the doc
71 devsite doc tree and does not have an extension. 59 tree and does not have an extension.
72 60
73 Here's a link to a document in a subdirectory: :doc:`the tutorial 61 Here's a link to a document in a subdirectory: :doc:`the tutorial
74 <devguide/tutorial/tutorial-part1>`. And a link to a subdirectory index page 62 <devguide/tutorial/tutorial-part1>`. And a link to a subdirectory index page
75 :doc:`devguide index <devguide/index>`. 63 :doc:`devguide index <devguide/index>`.
76 64
77 To sections inside documents 65 To sections inside documents
78 ---------------------------- 66 ----------------------------
79 67
80 To internal locations within documents, labels are used. For example, this link 68 To internal locations within documents, labels are used. For example, this link
81 goes to the label explicitly placed in this document - 69 goes to the label explicitly placed in this document -
82 :ref:`link_for_section_heading`. This works across documents as well. Label 70 :ref:`link_for_section_heading`. This works across documents as well. Label
83 names must be unique in the tree, and can refer to anything (like images). 71 names must be unique in the tree, and can refer to anything (like images).
84 72
85 It's also possible to give such cross-references custom names: :ref:`Same 73 It's also possible to give such cross-references custom names: :ref:`Same
86 Section Heading<link_for_section_heading>`. 74 Section Heading<link_for_section_heading>`.
87 75
88 To external locations 76 To external locations
89 --------------------- 77 ---------------------
90 78
91 Plain links can be placed like this: http://google.com and also `like this 79 Plain links can be placed like this: http://google.com and also `like this
92 <http://google.com>`_. 80 <http://google.com>`_.
93 81
94 Definition lists 82 Definition lists
95 ================ 83 ================
96 84
97 Can be used to define a group of related terms. Internal formatting is supported 85 Can be used to define a group of related terms. Internal formatting is supported
98 within the definition. No special formatting needs to be done for the definition 86 within the definition. No special formatting needs to be done for the definition
99 name/title - it's handled by the devsite. 87 name/title - it's handled by the chromesite documentation server.
100 88
101 Apple 89 Apple
102 The apple is the pomaceous fruit of the apple tree, species Malus domestica in 90 The apple is the pomaceous fruit of the apple tree, species Malus domestica in
103 the rose family (**Rosaceae**). 91 the rose family (**Rosaceae**).
104 Fig 92 Fig
105 The common fig (**Ficus carica**) is a species of flowering plant in the genus 93 The common fig (**Ficus carica**) is a species of flowering plant in the genus
106 Ficus, from the family Moraceae, known as the common fig (or just the fig), 94 Ficus, from the family Moraceae, known as the common fig (or just the fig),
107 anjeer (Iran, Pakistan), and dumur (Bengali). 95 anjeer (Iran, Pakistan), and dumur (Bengali).
108 Pear 96 Pear
109 The pear is any of several tree and shrub species of genus Pyrus, in the 97 The pear is any of several tree and shrub species of genus Pyrus, in the
110 family Rosaceae. 98 family Rosaceae.
111 99
112 Notes and Admonitions 100 Notes and Admonitions
113 ===================== 101 =====================
114 102
115 The devsite supports special "notes" that are indented and have a background 103 The documentation server supports special "notes" that are indented and have a
116 color. We'll generate them with the ``Note`` directive, providing the class 104 background color. We'll generate them with the ``Note`` directive, providing
117 explicitly. The class is one of ``note``, ``caution``, ``warning``, 105 the class explicitly. The class is one of ``note``, ``caution``, ``warning``,
118 ``special``. 106 ``special``.
119 107
120 .. Note:: 108 .. Note::
121 :class: note 109 :class: note
122 110
123 This is a note. 111 This is a note.
124 112
125 Foo bar. 113 Foo bar.
126 114
127 Also: 115 Also:
128 116
129 .. Note:: 117 .. Note::
130 :class: caution 118 :class: caution
131 119
132 Caution -- you have been warned. 120 Caution -- you have been warned.
133 121
134 Source code 122 Source code
135 =========== 123 ===========
136 124
137 Here's source code that will be pretty-printed on the devsite. Outside 125 Here's source code that will be pretty-printed. It's just a plain ``<pre>``
138 production mode, it's just a plain ``<pre>`` that presents pre-formatted code 126 that presents pre-formatted code with coloring:
139 without coloring:
140 127
141 .. naclcode:: 128 .. naclcode::
142 129
143 #include <iostream> 130 #include <iostream>
144 131
145 int main() { 132 int main() {
146 char c = 'x'; 133 char c = 'x';
147 std::cout << "Hello world\n"; 134 std::cout << "Hello world\n";
148 return 0; 135 return 0;
149 } 136 }
(...skipping 28 matching lines...) Expand all
178 Sub-subsection heading 165 Sub-subsection heading
179 ^^^^^^^^^^^^^^^^^^^^^^ 166 ^^^^^^^^^^^^^^^^^^^^^^
180 167
181 That's pretty deep... 168 That's pretty deep...
182 169
183 Sub-sub-subsection heading 170 Sub-sub-subsection heading
184 """""""""""""""""""""""""" 171 """"""""""""""""""""""""""
185 172
186 It's probably not the best idea to go this far (renders to ``<h5>``). 173 It's probably not the best idea to go this far (renders to ``<h5>``).
187 174
188 Expandable sections
189 ===================
190
191 The devsite can render expandable sections when a special ``class`` is applied.
192 This can be achieved by specifying the ``rst-class`` immediately before a
193 section (or any other element), as follows:
194
195 .. rst-class:: expandable
196
197 Expandable Section
198 ------------------
199
200 Look, ma! I'm expandable!
201
202 Lists 175 Lists
203 ===== 176 =====
204 177
205 Auto-numbered ordered lists: 178 Auto-numbered ordered lists:
206 179
207 #. One 180 #. One
208 #. Two 181 #. Two
209 #. Three 182 #. Three
210 183
211 Manually numbered ordered lists: 184 Manually numbered ordered lists:
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 223
251 +------------------------+------------+----------+----------+ 224 +------------------------+------------+----------+----------+
252 | Header row, column 1 | Header 2 | Header 3 | Header 4 | 225 | Header row, column 1 | Header 2 | Header 3 | Header 4 |
253 | (header rows optional) | | | | 226 | (header rows optional) | | | |
254 +========================+============+==========+==========+ 227 +========================+============+==========+==========+
255 | body row 1, column 1 | column 2 | column 3 | column 4 | 228 | body row 1, column 1 | column 2 | column 3 | column 4 |
256 +------------------------+------------+----------+----------+ 229 +------------------------+------------+----------+----------+
257 | body row 2 | ... | ... | | 230 | body row 2 | ... | ... | |
258 +------------------------+------------+----------+----------+ 231 +------------------------+------------+----------+----------+
259 232
OLDNEW
« native_client_sdk/src/doc/Makefile ('K') | « native_client_sdk/src/doc/doxygen/generate_docs.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698