<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Writing Bugzilla Documentation — Bugzilla 5.0.4 documentation</title> <link rel="stylesheet" href="_static/bugzilla.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: './', VERSION: '5.0.4', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true, SOURCELINK_SUFFIX: '.txt' }; </script> <script type="text/javascript" src="_static/jquery.js"></script> <script type="text/javascript" src="_static/underscore.js"></script> <script type="text/javascript" src="_static/doctools.js"></script> <link rel="shortcut icon" href="_static/favicon.ico"/> <link rel="search" title="Search" href="search.html" /> </head> <body> <div class="related" role="navigation" aria-label="related navigation"> <h3>Navigation</h3> <ul> <li class="nav-item nav-item-0"><a href="index.html">Bugzilla 5.0.4 documentation</a> »</li> </ul> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body" role="main"> <div class="section" id="writing-bugzilla-documentation"> <span id="style-guide"></span><h1>Writing Bugzilla Documentation<a class="headerlink" href="#writing-bugzilla-documentation" title="Permalink to this headline">¶</a></h1> <p>The Bugzilla documentation uses <a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructured Text (reST)</a>, as extended by our documentation compilation tool, <a class="reference external" href="http://sphinx-doc.org/">Sphinx</a>. This document is a reST document for demonstration purposes. To learn from it, you need to read it in reST form.</p> <p>When you build the docs, this document gets built (at least in the HTML version) as a standalone file, although it isn't as useful in that form because some of the directives discussed are invisible or change when rendered.</p> <p><a class="reference external" href="http://sphinx-doc.org/latest/rest.html">The Sphinx documentation</a> gives a good introduction to reST and the Sphinx-specific extensions. Reading that one immediately-linked page should be enough to get started. Later, the <a class="reference external" href="http://sphinx-doc.org/latest/markup/inline.html">inline markup section</a> is worth a read.</p> <p>Bugzilla's particular documentation conventions are as follows:</p> <div class="section" id="block-directives"> <h2>Block Directives<a class="headerlink" href="#block-directives" title="Permalink to this headline">¶</a></h2> <p>Chapter headings use the double-equals, page title headings the #, and then the three other levels are headings within a page. Every heading should be preceded by an anchor, with a globally-unique name with no spaces. Now, we demonstrate the available heading levels we haven't used yet:</p> <div class="section" id="third-level-heading"> <span id="uniqueanchorname"></span><h3>Third Level Heading<a class="headerlink" href="#third-level-heading" title="Permalink to this headline">¶</a></h3> <div class="section" id="fourth-level-heading"> <h4>Fourth Level Heading<a class="headerlink" href="#fourth-level-heading" title="Permalink to this headline">¶</a></h4> <div class="section" id="fifth-level-heading"> <h5>Fifth Level Heading<a class="headerlink" href="#fifth-level-heading" title="Permalink to this headline">¶</a></h5> <p>(Although try not to use headings as deep as the 5th level.)</p> <p>Make links to anchors like this: <a class="reference internal" href="#uniqueanchorname"><span class="std std-ref">Third Level Heading</span></a>. It'll pick up the following heading name automatically and use it as the link text. Don't use standard reST internal links like <a class="reference internal" href="#uniqueanchorname">uniqueanchorname</a> - they don't work across files.</p> <p>Comments are done like this:</p> <p>Other block types:</p> <div class="admonition note"> <p class="first admonition-title">Note</p> <p class="last">This is just a note, for your information. Like all double-dot blocks, follow-on lines need to be indented.</p> </div> <div class="admonition warning"> <p class="first admonition-title">Warning</p> <p class="last">This is a warning of a potential serious problem you should be aware of.</p> </div> <p>Use both of the above block types sparingly. Consider putting the information in the main text, omitting it, or (if long) placing it in a subsidiary file.</p> <p>Code gets highlighted using Pygments. Choose the highlighter at the top of each file using:</p> <p>You can change the highlighter for a particular block by introducing it like this:</p> <div class="highlight-perl"><div class="highlight"><pre><span></span><span class="c1"># This is some Perl code</span> <span class="k">print</span> <span class="s">"Hello"</span><span class="p">;</span> </pre></div> </div> <p>There is a <a class="reference external" href="http://pygments.org/docs/lexers/">list of all available lexer names</a> available. We currently use <code class="docutils literal"><span class="pre">console</span></code>, <code class="docutils literal"><span class="pre">perl</span></code>, and <code class="docutils literal"><span class="pre">sql</span></code>. <code class="docutils literal"><span class="pre">none</span></code> is also a valid value.</p> <p>Use 4-space indentation, except where a different value is better so that things line up. So normally two spaces for bulleted lists, and 3 spaces for .. blocks.</p> </div> </div> </div> </div> <div class="section" id="inline-directives"> <h2>Inline Directives<a class="headerlink" href="#inline-directives" title="Permalink to this headline">¶</a></h2> <div class="admonition warning"> <p class="first admonition-title">Warning</p> <p class="last">Remember that reST does not support nested inline markup. So you can't have a substitution inside a link, or bold inside italics.</p> </div> <ul class="simple"> <li>A filename or a path to a filename: <code class="file docutils literal"><span class="pre">/path/to/</span><em><span class="pre">variable-bit-of-path</span></em><span class="pre">/filename.ext</span></code></li> <li>A command to type in the shell: <strong class="command">command --arguments</strong></li> <li>A parameter name: <span class="param">shutdownhtml</span></li> <li>A parameter value: <span class="paramval">DB</span></li> <li>A group name: <span class="group">editbugs</span></li> <li>A bug field name: <span class="field">Summary</span></li> <li>Any string from the UI: <span class="guilabel">Administration</span></li> <li>A specific BMO bug: <a class="reference external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=201069">bug 201069</a></li> </ul> <hr class="docutils" /> <p>This documentation undoubtedly has bugs; if you find some, please file them <a class="reference external" href="https://bugzilla.mozilla.org/enter_bug.cgi?product=Bugzilla&component=Documentation">here</a>.</p> </div> </div> </div> </div> </div> <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> <div class="sphinxsidebarwrapper"> <p class="logo"><a href="index.html"> <img class="logo" src="_static/bugzilla.png" alt="Logo"/> </a></p> <h3><a href="index.html">Table Of Contents</a></h3> <ul> <li><a class="reference internal" href="#">Writing Bugzilla Documentation</a><ul> <li><a class="reference internal" href="#block-directives">Block Directives</a><ul> <li><a class="reference internal" href="#third-level-heading">Third Level Heading</a><ul> <li><a class="reference internal" href="#fourth-level-heading">Fourth Level Heading</a><ul> <li><a class="reference internal" href="#fifth-level-heading">Fifth Level Heading</a></li> </ul> </li> </ul> </li> </ul> </li> <li><a class="reference internal" href="#inline-directives">Inline Directives</a></li> </ul> </li> </ul> <div id="searchbox" style="display: none" role="search"> <h3>Quick search</h3> <form class="search" action="search.html" method="get"> <div><input type="text" name="q" /></div> <div><input type="submit" value="Go" /></div> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> </div> <script type="text/javascript">$('#searchbox').show(0);</script> </div> </div> <div class="clearer"></div> </div> <div class="related" role="navigation" aria-label="related navigation"> <h3>Navigation</h3> <ul> <li class="nav-item nav-item-0"><a href="index.html">Bugzilla 5.0.4 documentation</a> »</li> </ul> </div> <div class="footer" role="contentinfo"> Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.6. </div> </body> </html>