saivann/bitcoin.org — pull request #76 by harding (2014-04-19 19:21:04+00:00)
Title: Create Prototype RPC For API Reference

Preview: http://dg1.dtrt.org/en/api-reference

This prototype RPC reformats the output of bitcoin-cli help createrawtransaction, clarifying some of the description and adding a concrete example.

* The RPC command is the name of the h4 subsection.

* The subsection starts off with a prototype command much like a Unix-style manual page. This prototype gets its own CSS class so we can optionally give it a distinctive style

* Each argument to the RPC gets its own h5 subsection. The reformatted code from the `help` text gets its own CSS class so we can optionally give it a distinctive style.

* The results of the RPC also gets its own h5 subsection.

* I rolled my own real-life testnet example. The examples from `help` use placeholder variables which make for less clear examples. Both the commands run and the resulting output get their own CSS class.

I haven't styled any of the new CSS classes here; @saivann always has much better ideas than I do.

Other changes:

* Added div to give APIref the same style as devguide so I could see if the code blocks were overflowing the layout.

* Removed reference-style links from devguide and put them in _includes/references.md. Then use an {% include %} in both devguide and APIref to source that file.

Not done:

* No highlighting applied. Most of the code blocks here don't contain actual code---just prototypes---so even if syntax highlighting would apply well to these code blocks, it probably won't apply well to all of our code blocks.

If this format works for everyone, I'll merge this request and create a todo list of RPCs on issue #72.