| 1 | ## This is an official page. Only editors and admins can change it. |
|---|
| 2 | #acl All:read EditorGroup:read,write |
|---|
| 3 | #format rst |
|---|
| 4 | |
|---|
| 5 | |
|---|
| 6 | Contributing Documentation to TurboGears |
|---|
| 7 | ======================================== |
|---|
| 8 | |
|---|
| 9 | :status: Official |
|---|
| 10 | |
|---|
| 11 | .. contents:: |
|---|
| 12 | :depth: 2 |
|---|
| 13 | |
|---|
| 14 | |
|---|
| 15 | |contribute_docs| |
|---|
| 16 | |
|---|
| 17 | .. |contribute_docs| image:: 1.0/RoughDocs/contribute_docs.jpg |
|---|
| 18 | |
|---|
| 19 | Three Ways to Help |
|---|
| 20 | ------------------ |
|---|
| 21 | |
|---|
| 22 | There are three ways to help make and maintain TurboGears documentation: |
|---|
| 23 | |
|---|
| 24 | #. Comment! Pages should all have a comments box at the bottom. Add your |
|---|
| 25 | comments if you see a problem. |
|---|
| 26 | |
|---|
| 27 | .. Note:: Note: Comment sections have been increasingly locked up due to wiki |
|---|
| 28 | spamming. Sorry for this inconvenience. |
|---|
| 29 | |
|---|
| 30 | 2. `Add to the RoughDocs`_ section for the version of TurboGears you're using. |
|---|
| 31 | Anyone can add and edit documentation there following the directions below. |
|---|
| 32 | Please do! |
|---|
| 33 | |
|---|
| 34 | #. Become an editor! Knowledgeable TurboGears users with the interest and |
|---|
| 35 | aptitude can become editors. Editors are able to edit the "official" docs. |
|---|
| 36 | To get involved, visit the `documentation team page |
|---|
| 37 | <DocTeam>`_. |
|---|
| 38 | |
|---|
| 39 | |
|---|
| 40 | .. _Add to the RoughDocs: |
|---|
| 41 | |
|---|
| 42 | How to Add or Change Documentation |
|---|
| 43 | ---------------------------------- |
|---|
| 44 | |
|---|
| 45 | |
|---|
| 46 | Putting Docs in the Right Places |
|---|
| 47 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 48 | |
|---|
| 49 | All docs about the TurboGears framework *must* have a version number at the |
|---|
| 50 | beginning of the page name (i.e the last part of the URL), in sub wiki syntax. |
|---|
| 51 | If you write a page about Apache deployment for TurboGears 1.0, that page |
|---|
| 52 | should be called "``1.0/ApacheDeployment``". |
|---|
| 53 | |
|---|
| 54 | New articles should be linked from the RoughDocs page for the applicable |
|---|
| 55 | version (e.g. `1.0/RoughDocs <1.0/RoughDocs>`_) until they have been reviewed |
|---|
| 56 | and approved by the editors and given "official" status. This also ensures that |
|---|
| 57 | new documents don't get lost and others can benefit from and/or contribute to |
|---|
| 58 | them immediately. |
|---|
| 59 | |
|---|
| 60 | Multi-page documents should use the sub wiki format to reflect the pages, e.g. |
|---|
| 61 | "``1.0/20MinuteWiki/Page1``". |
|---|
| 62 | |
|---|
| 63 | |
|---|
| 64 | Documentation Format & Style Guidelines |
|---|
| 65 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 66 | |
|---|
| 67 | In an effort to keep the documentation consistent online and useful offline, |
|---|
| 68 | please follow these conventions: |
|---|
| 69 | |
|---|
| 70 | |
|---|
| 71 | All documentation should be in *ReStructuredText (ReST)* format, **not the |
|---|
| 72 | standard wiki markup** [#]_. |
|---|
| 73 | |
|---|
| 74 | There are two templates that should be used to get you going with your document. |
|---|
| 75 | Both templates set the format to `ReST Formatting`_ and they also include the |
|---|
| 76 | proper code to include the page comment form. |
|---|
| 77 | |
|---|
| 78 | OfficialTemplate |
|---|
| 79 | For official docs, this template ensures that only editors can edit. |
|---|
| 80 | |
|---|
| 81 | TurboGearsTemplate |
|---|
| 82 | For any contributed or unofficial docs. |
|---|
| 83 | |
|---|
| 84 | |
|---|
| 85 | Designating ReST Syntax |
|---|
| 86 | ``````````````````````` |
|---|
| 87 | |
|---|
| 88 | Please note that if you choose not to use one of these templates you will have |
|---|
| 89 | to explicitly tell MoinMoin that you are using ReST syntax. This is done by |
|---|
| 90 | adding the following code to the top of the page, before any text:: |
|---|
| 91 | |
|---|
| 92 | #format rst |
|---|
| 93 | |
|---|
| 94 | Proper `ReST formatting`_ syntax is discussed below. |
|---|
| 95 | |
|---|
| 96 | |
|---|
| 97 | Page Status |
|---|
| 98 | ``````````` |
|---|
| 99 | |
|---|
| 100 | All documentation pages should display their editorial status right below the |
|---|
| 101 | main heading (like this page does). Use the `field lists syntax`_ for the |
|---|
| 102 | status tag:: |
|---|
| 103 | |
|---|
| 104 | This is the Page Title |
|---|
| 105 | ====================== |
|---|
| 106 | |
|---|
| 107 | :Status: Draft |
|---|
| 108 | |
|---|
| 109 | Status tag values should be one or several of "Official", "Contributed", |
|---|
| 110 | "Work in Progress", "Draft", "Approved", "Obsolete", "Not verified" etc. |
|---|
| 111 | |
|---|
| 112 | .. _field lists syntax: |
|---|
| 113 | http://docutils.sourceforge.net/docs/user/rst/quickref.html#field-lists |
|---|
| 114 | |
|---|
| 115 | |
|---|
| 116 | Table of Contents |
|---|
| 117 | ````````````````` |
|---|
| 118 | |
|---|
| 119 | All pages with longer than a screen page should have a table of contents. |
|---|
| 120 | This will be generated automatically by the wiki software from the section |
|---|
| 121 | headings if you include this markup directly after the status tag:: |
|---|
| 122 | |
|---|
| 123 | .. contents:: |
|---|
| 124 | :depth: 2 |
|---|
| 125 | |
|---|
| 126 | The ``depth`` option tells the ReST parser how many heading-levels should |
|---|
| 127 | be included in the table of contents. |
|---|
| 128 | |
|---|
| 129 | |
|---|
| 130 | |
|---|
| 131 | Language & Style |
|---|
| 132 | ```````````````` |
|---|
| 133 | |
|---|
| 134 | #. **Please pay attention to proper spelling, grammar, and style!** |
|---|
| 135 | For example, |
|---|
| 136 | |
|---|
| 137 | * All full sentences should end with a full stop. |
|---|
| 138 | * Proper names should be capitalized. |
|---|
| 139 | * Common word contractions should be written out |
|---|
| 140 | (i.e. "you should" instead of "you'd", etc.) |
|---|
| 141 | |
|---|
| 142 | #. Avoid too many abbreviations and jargon speak. |
|---|
| 143 | |
|---|
| 144 | #. Avoid slang and idioms (e.g. "This should be a piece of cake.") Not every |
|---|
| 145 | reader of the docs is a native English speaker so it will not always |
|---|
| 146 | mean what you meant it to mean! |
|---|
| 147 | |
|---|
| 148 | #. All major words in the page title and headings should be capitalized |
|---|
| 149 | (e.g. "This is a Good Heading", but "This is not a good heading".) The |
|---|
| 150 | exceptions are articles, conjunctions, and short prepositions, etc. |
|---|
| 151 | |
|---|
| 152 | |
|---|
| 153 | #. Use literal syntax (see below) for names of Python objects, functions, |
|---|
| 154 | modules etc., shell commands, software packages, and so on. |
|---|
| 155 | |
|---|
| 156 | #. A full command line should go in a block literal (see below) so that it is |
|---|
| 157 | easier to notice. |
|---|
| 158 | |
|---|
| 159 | #. The name for an example project (e.g. ``Wiki 20``) is ``<projectname>`` |
|---|
| 160 | and the Python package name (e.g. ``wiki_20``) is ``<packagename>``. |
|---|
| 161 | |
|---|
| 162 | |
|---|
| 163 | ReST Formatting |
|---|
| 164 | ``````````````` |
|---|
| 165 | |
|---|
| 166 | Some markup guidelines and essentials of ReST syntax are listed below. For |
|---|
| 167 | summary reference, visit this `Quick Reference page`_ or this more |
|---|
| 168 | `extensive list`_. |
|---|
| 169 | |
|---|
| 170 | Treat the ReST source as you would treat Python source code by making it |
|---|
| 171 | nicely formatted and beautiful. When it helps, you can edit the page source |
|---|
| 172 | in your local editor and paste it back into the wiki editor interface when |
|---|
| 173 | you ready. |
|---|
| 174 | |
|---|
| 175 | |
|---|
| 176 | #. Wrap ReST source lines at 80 characters. |
|---|
| 177 | |
|---|
| 178 | #. Insert two empty lines before and one after each heading. |
|---|
| 179 | |
|---|
| 180 | #. Keep the indentation of literal blocks consistent. |
|---|
| 181 | |
|---|
| 182 | #. The page title should be underlined with equal signs (``=``). |
|---|
| 183 | |
|---|
| 184 | #. Section headings should be underlined with ``-`` (dash), ``~`` (tilde), |
|---|
| 185 | and ` (backtick), according to their level in the section hierarchy in |
|---|
| 186 | the order given here. Keep the underline the same length as the section |
|---|
| 187 | title. |
|---|
| 188 | |
|---|
| 189 | #. Literals are any chunk of code, including variable names and parameters |
|---|
| 190 | and anything you type directly into a terminal. Literals are surrounded |
|---|
| 191 | by double backticks. (If you run across one of the few instances of the |
|---|
| 192 | older convention of surrounding literals with quotes, please drop the |
|---|
| 193 | quotes and replace with double backticks.) |
|---|
| 194 | |
|---|
| 195 | #. Block literal sections are for longer examples and command lines. |
|---|
| 196 | |
|---|
| 197 | If you have a block literal section, and the preceding line ends with a |
|---|
| 198 | colon, just double that colon. For example, instead of inline style |
|---|
| 199 | ``tg-admin info``, you would write:: |
|---|
| 200 | |
|---|
| 201 | Please run:: |
|---|
| 202 | |
|---|
| 203 | tg-admin info |
|---|
| 204 | |
|---|
| 205 | Please notice the empty line after the double colon and the indentation of |
|---|
| 206 | the literal block (the command). |
|---|
| 207 | |
|---|
| 208 | With this form there will be one colon at the end of the line preceding the |
|---|
| 209 | literal block in the output. If you don't want this, you can put the double |
|---|
| 210 | colon on a single line and it will not show in the output:: |
|---|
| 211 | |
|---|
| 212 | :: |
|---|
| 213 | |
|---|
| 214 | foo = Bar() |
|---|
| 215 | |
|---|
| 216 | #. Links should be marked up in the standard ReStructured Text |
|---|
| 217 | `callout style`_:: |
|---|
| 218 | |
|---|
| 219 | This is an `example link`_. |
|---|
| 220 | |
|---|
| 221 | .. _example link: 1.0/ExampleLink |
|---|
| 222 | |
|---|
| 223 | * If the URL is very long, you can put a line break after the colon and indent |
|---|
| 224 | the URL on the next line. |
|---|
| 225 | |
|---|
| 226 | * Put the all URLs from one section at the end of |
|---|
| 227 | the section. |
|---|
| 228 | |
|---|
| 229 | * One-word links don't need backticks: ``mylink_``. |
|---|
| 230 | |
|---|
| 231 | * The link target should not be enclosed in backticks and is not case-sensitive. |
|---|
| 232 | |
|---|
| 233 | #. Try to use list syntax for lists instead of formatting the lists yourself |
|---|
| 234 | with bold or italics. This mostly comes up when dealing with lists of |
|---|
| 235 | arguments etc. The `Configuration <1.0/Configuration>`_ page is a good |
|---|
| 236 | example:: |
|---|
| 237 | |
|---|
| 238 | ``arg1`` |
|---|
| 239 | argument 1 explanation text |
|---|
| 240 | ``arg2`` |
|---|
| 241 | argument 2 explanation text |
|---|
| 242 | |
|---|
| 243 | #. First-level lists have *no* indentation in the ReST source. |
|---|
| 244 | |
|---|
| 245 | #. For ordered lists, don't number the items yourself. Use this syntax instead:: |
|---|
| 246 | |
|---|
| 247 | #. Item one |
|---|
| 248 | #. Item two |
|---|
| 249 | #. ... |
|---|
| 250 | |
|---|
| 251 | #. You can also break lines in lists, footnotes and notes, if you indent the |
|---|
| 252 | second and following lines the same level. |
|---|
| 253 | |
|---|
| 254 | |
|---|
| 255 | For list items, the indentation level must match that of the first letter on |
|---|
| 256 | the first line, e.g.:: |
|---|
| 257 | |
|---|
| 258 | * This is a multi-line |
|---|
| 259 | list item. |
|---|
| 260 | #. List items can have several paragraphs. |
|---|
| 261 | |
|---|
| 262 | Like this. |
|---|
| 263 | |
|---|
| 264 | |
|---|
| 265 | Remember, pages marked with "Official[, Approved]" are considered to be |
|---|
| 266 | accurate, reviewed and have proper style. Copy editing is an essential |
|---|
| 267 | part of maintaining high quality documents. |
|---|
| 268 | |
|---|
| 269 | .. _callout style: |
|---|
| 270 | http://docutils.sourceforge.net/docs/user/rst/quickref.html#hyperlink-targets |
|---|
| 271 | |
|---|
| 272 | |
|---|
| 273 | |
|---|
| 274 | Document Submission Procedure |
|---|
| 275 | ----------------------------- |
|---|
| 276 | |
|---|
| 277 | Newly Created Documents |
|---|
| 278 | ~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 279 | |
|---|
| 280 | While working on a new document, set the status to *"Work in progress"*. |
|---|
| 281 | |
|---|
| 282 | Once completed to your satisfaction, |
|---|
| 283 | |
|---|
| 284 | #. Change status to *"Draft"*. |
|---|
| 285 | |
|---|
| 286 | #. Open a new Trac ticket requesting a review. (See `Opening New Document Tickets`_ |
|---|
| 287 | below.) |
|---|
| 288 | |
|---|
| 289 | |
|---|
| 290 | |
|---|
| 291 | Improvements upon Existing Documents |
|---|
| 292 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 293 | |
|---|
| 294 | Editable Documents |
|---|
| 295 | `````````````````` |
|---|
| 296 | * If you think you know what you are doing: |
|---|
| 297 | |
|---|
| 298 | #. Edit document directly. |
|---|
| 299 | #. Do not open a ticket. |
|---|
| 300 | |
|---|
| 301 | * If you have doubts: |
|---|
| 302 | |
|---|
| 303 | #. Edit what you can. |
|---|
| 304 | #. Open *one* ticket for review and all the rest of the issues with that page |
|---|
| 305 | |
|---|
| 306 | Official Documents |
|---|
| 307 | `````````````````` |
|---|
| 308 | |
|---|
| 309 | If you work on a document that is marked *Official*, |
|---|
| 310 | |
|---|
| 311 | * If you have write access: |
|---|
| 312 | |
|---|
| 313 | #. Please take extra care. |
|---|
| 314 | |
|---|
| 315 | #. Set the status to "Official, Draft" until at least one other person has |
|---|
| 316 | had a chance to look at your changes. |
|---|
| 317 | |
|---|
| 318 | #. Open a new ticket. |
|---|
| 319 | |
|---|
| 320 | * If you do not have write access: |
|---|
| 321 | |
|---|
| 322 | #. Download raw text of the original document. |
|---|
| 323 | #. Make changes at your local computer. |
|---|
| 324 | #. Create a diff file of your changes with `diff -u old new`. |
|---|
| 325 | #. Open a new ticket. |
|---|
| 326 | #. Attach diff file to ticket. |
|---|
| 327 | |
|---|
| 328 | |
|---|
| 329 | Opening New Document Tickets |
|---|
| 330 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 331 | #. Open a `new Trac ticket`_. |
|---|
| 332 | |
|---|
| 333 | #. Put the document's title in the ticket summary |
|---|
| 334 | |
|---|
| 335 | #. Set Component=Docs |
|---|
| 336 | |
|---|
| 337 | #. Set Version=X.0 (one decimal place only) |
|---|
| 338 | |
|---|
| 339 | #. Set Keywords to "doc review" |
|---|
| 340 | |
|---|
| 341 | #. If you could not edit the document yourself, attach a diff file |
|---|
| 342 | of your proposed changes. |
|---|
| 343 | |
|---|
| 344 | .. _new Trac ticket: http://trac.turbogears.org/newticket |
|---|
| 345 | |
|---|
| 346 | |
|---|
| 347 | Resources |
|---|
| 348 | --------- |
|---|
| 349 | |
|---|
| 350 | .. * There are some wiki ReST syntax snippets ready to be copied and pasted |
|---|
| 351 | on Chris Arndt's `personal wiki page`_ |
|---|
| 352 | |
|---|
| 353 | * `Documentation Team Page`_ |
|---|
| 354 | * `ReST Quick Reference`_ |
|---|
| 355 | * Lots of `ReST Information`_ |
|---|
| 356 | * `RoughDocs Page for 1.0 <1.0/RoughDocs>`_ |
|---|
| 357 | * `TurboGears Trac <http://trac.turbogears.org>`_ |
|---|
| 358 | |
|---|
| 359 | .. _personal wiki page: ChristopherArndt/Snippets |
|---|
| 360 | |
|---|
| 361 | ---- |
|---|
| 362 | |
|---|
| 363 | .. [#] This is very important for ensuring the long term value of the |
|---|
| 364 | docs we write. We expect to move to another documentation system |
|---|
| 365 | at some point in the future, or we might want to convert the docs to |
|---|
| 366 | printable form. The use of ReStructuredText will allow us to do |
|---|
| 367 | that without complex document conversions. |
|---|
| 368 | |
|---|
| 369 | .. _ReST Information: |
|---|
| 370 | .. _extensive list: http://docutils.sourceforge.net/rst.html |
|---|
| 371 | .. _quick reference page: |
|---|
| 372 | .. _ReST Quick Reference: |
|---|
| 373 | http://docutils.sourceforge.net/docs/user/rst/quickref.html |
|---|
| 374 | |
|---|