<p>Patrick Rudolph has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/26602">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Documentation: Add rules for writing Documentation<br><br>Change-Id: Ic3808a0a10ddc8064d185e0920dcd9f60c435419<br>Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com><br>---<br>M Documentation/index.md<br>A Documentation/writing_documentation.md<br>2 files changed, 71 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/02/26602/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/Documentation/index.md b/Documentation/index.md</span><br><span>index afe892d..1fd5c73 100644</span><br><span>--- a/Documentation/index.md</span><br><span>+++ b/Documentation/index.md</span><br><span>@@ -9,6 +9,7 @@</span><br><span> </span><br><span> * [Getting Started](getting_started/index.md)</span><br><span> * [Rookie Guide](lessons/index.md)</span><br><span style="color: hsl(120, 100%, 40%);">+* [Writing Documentation](writing_documentation.md)</span><br><span> * [Timestamps](timestamp.md)</span><br><span> * [Dealing with Untrusted Input in SMM](technotes/2017-02-dealing-with-untrusted-input-in-smm.md)</span><br><span> * [ABI data consumption](abi-data-consumption.md)</span><br><span>diff --git a/Documentation/writing_documentation.md b/Documentation/writing_documentation.md</span><br><span>new file mode 100644</span><br><span>index 0000000..82cb599</span><br><span>--- /dev/null</span><br><span>+++ b/Documentation/writing_documentation.md</span><br><span>@@ -0,0 +1,70 @@</span><br><span style="color: hsl(120, 100%, 40%);">+# coreboot documentation guidelines</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+> Documentation is like sex: when it is good, it is very, very good; and when it is bad, it is better than nothing.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+That said please always try to write documentation! One problem in the firmware development</span><br><span style="color: hsl(120, 100%, 40%);">+is the missing documentation. In this document you will get a brief introduction how to write,</span><br><span style="color: hsl(120, 100%, 40%);">+submit and publish documenation to coreboot.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+## Preparations</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+coreboot uses [Sphinx] documentation tool. We prefer the markdown format over</span><br><span style="color: hsl(120, 100%, 40%);">+reStructuredText so only embedded ReST is supported. Checkout the [Markdown Guide]</span><br><span style="color: hsl(120, 100%, 40%);">+for more information.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+### Install Sphinx</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+Please follow this official [guide].</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+### Optional</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+Install [shinx-autobuild] for rebuilding markdown/rst sources on the fly!</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+## Basic and simple rules</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+The following rules must be followed in order to get it at least reviewed on [review.coreboot.org].</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+Documentation:</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+1.  Must be written in **markdown** or **embedded reStructuredText** format.</span><br><span style="color: hsl(120, 100%, 40%);">+2.  Must be written in **English**.</span><br><span style="color: hsl(120, 100%, 40%);">+3.  Must be placed into **Documentation/** directory subfolder.</span><br><span style="color: hsl(120, 100%, 40%);">+4.  Must have the same directory structure as the code under **src/**.</span><br><span style="color: hsl(120, 100%, 40%);">+5.  Must be linked/included into higher markdown files if sections are used.</span><br><span style="color: hsl(120, 100%, 40%);">+6.  Must follow the [Gerrit Guidelines].</span><br><span style="color: hsl(120, 100%, 40%);">+7.  Must have all **lowercase filenames**.</span><br><span style="color: hsl(120, 100%, 40%);">+8.  Running text should have a visible width of about **72 chars**.</span><br><span style="color: hsl(120, 100%, 40%);">+9.  Must not **duplicate** documentation, but reference it instead.</span><br><span style="color: hsl(120, 100%, 40%);">+10.  Must not include the same picture in multiple markdown files.</span><br><span style="color: hsl(120, 100%, 40%);">+11.  Must not include pictures that are bigger than 500px in width.</span><br><span style="color: hsl(120, 100%, 40%);">+12.  Must include only **relevant** information.</span><br><span style="color: hsl(120, 100%, 40%);">+13.  Sholdn't go into detail, for details, the code is the reference.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+## Markdown and Tables</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+Under Sphinx markdown tables are not supported. Therefore you can use following code block to</span><br><span style="color: hsl(120, 100%, 40%);">+write tables in reStructuredText and embed them into the markdown:</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+    ```eval_rst</span><br><span style="color: hsl(120, 100%, 40%);">+    +------------+------------+-----------+</span><br><span style="color: hsl(120, 100%, 40%);">+    | Header 1   | Header 2   | Header 3  |</span><br><span style="color: hsl(120, 100%, 40%);">+    +============+============+===========+</span><br><span style="color: hsl(120, 100%, 40%);">+    | body row 1 | column 2   | column 3  |</span><br><span style="color: hsl(120, 100%, 40%);">+    +------------+------------+-----------+</span><br><span style="color: hsl(120, 100%, 40%);">+    | body row 2 | Cells may span columns.|</span><br><span style="color: hsl(120, 100%, 40%);">+    +------------+------------+-----------+</span><br><span style="color: hsl(120, 100%, 40%);">+    | body row 3 | Cells may  | - Cells   |</span><br><span style="color: hsl(120, 100%, 40%);">+    +------------+ span rows. | - contain |</span><br><span style="color: hsl(120, 100%, 40%);">+    | body row 4 |            | - blocks. |</span><br><span style="color: hsl(120, 100%, 40%);">+    +------------+------------+-----------+</span><br><span style="color: hsl(120, 100%, 40%);">+    ``` #just a code block is enough</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+[coreboot]: https://coreboot.org</span><br><span style="color: hsl(120, 100%, 40%);">+[Documentation]: https://review.coreboot.org/cgit/coreboot.git/tree/Documentation</span><br><span style="color: hsl(120, 100%, 40%);">+[shinx-autobuild]: https://github.com/GaretJax/sphinx-autobuild</span><br><span style="color: hsl(120, 100%, 40%);">+[guide]: http://www.sphinx-doc.org/en/stable/install.html</span><br><span style="color: hsl(120, 100%, 40%);">+[Sphinx]: http://www.sphinx-doc.org/en/master/</span><br><span style="color: hsl(120, 100%, 40%);">+[Markdown Guide]: https://www.markdownguide.org/</span><br><span style="color: hsl(120, 100%, 40%);">+[Gerrit Guidelines]: https://doc.coreboot.org/gerrit_guidelines.html</span><br><span style="color: hsl(120, 100%, 40%);">+[review.coreboot.org]: https://review.coreboot.org</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/26602">change 26602</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/26602"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ic3808a0a10ddc8064d185e0920dcd9f60c435419 </div>
<div style="display:none"> Gerrit-Change-Number: 26602 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Patrick Rudolph <patrick.rudolph@9elements.com> </div>