summaryrefslogtreecommitdiffstats
path: root/docs/gettingstarted/writingdocs/styleguide/styleguide02.rst
diff options
context:
space:
mode:
authorJohn DeNisco <jdenisco@cisco.com>2018-07-26 12:45:10 -0400
committerDave Barach <openvpp@barachs.net>2018-07-26 18:34:47 +0000
commit06dcd45ff81e06bc8cf40ed487c0b2652d346a5a (patch)
tree71403f9d422c4e532b2871a66ab909bd6066b10b /docs/gettingstarted/writingdocs/styleguide/styleguide02.rst
parent1d65279ffecd0f540288187b94cb1a6b84a7a0c6 (diff)
Initial commit of Sphinx docs
Change-Id: I9fca8fb98502dffc2555f9de7f507b6f006e0e77 Signed-off-by: John DeNisco <jdenisco@cisco.com>
Diffstat (limited to 'docs/gettingstarted/writingdocs/styleguide/styleguide02.rst')
-rw-r--r--docs/gettingstarted/writingdocs/styleguide/styleguide02.rst83
1 files changed, 83 insertions, 0 deletions
diff --git a/docs/gettingstarted/writingdocs/styleguide/styleguide02.rst b/docs/gettingstarted/writingdocs/styleguide/styleguide02.rst
new file mode 100644
index 00000000000..e2d7649f585
--- /dev/null
+++ b/docs/gettingstarted/writingdocs/styleguide/styleguide02.rst
@@ -0,0 +1,83 @@
+.. _styleguide02:
+
+*************************
+Bullets, Bold and Italics
+*************************
+
+Bold text can be show with **Bold Text**, Italics with *Italic text*. Bullets like so:
+
+* Bullet 1
+* Bullet 2
+
+#. Numbered Bullet 1
+#. Numbered Bullet 2
+
+*****
+Notes
+*****
+
+A note can be used to describe something not in the normal flow of the paragragh. This
+is an example of a note.
+
+.. note::
+
+ Using **git commit** after adding your files saves a "Snapshot" of them, so it's very hard
+ to lose your work if you *commit often*.
+
+***********
+Code Blocks
+***********
+
+This paragraph describes how to do **Console Commands**. When showing VPP commands it is reccomended
+that the command be executed from the linux console as shown. The Highlighting in the final documents
+shows up nicely this way.
+
+.. code-block:: console
+
+ $ sudo bash
+ # vppctl show interface
+ Name Idx State Counter Count
+ TenGigabitEthernet86/0/0 1 up rx packets 6569213
+ rx bytes 9928352943
+ tx packets 50384
+ tx bytes 3329279
+ TenGigabitEthernet86/0/1 2 down
+ VirtualEthernet0/0/0 3 up rx packets 50384
+ rx bytes 3329279
+ tx packets 6569213
+ tx bytes 9928352943
+ drops 1498
+ local0 0 down
+ #
+
+
+The **code-block** construct is also used for code samples. The following shows how to include a block of
+"C" code.
+
+.. code-block:: c
+
+ #include <vlib/unix/unix.h>
+ abf_policy_t *
+ abf_policy_get (u32 index)
+ {
+ return (pool_elt_at_index (abf_policy_pool, index));
+ }
+
+Diffs are generated in the final docs nicely with "::" at the end of the description like so::
+
+ diff --git a/src/vpp/vnet/main.c b/src/vpp/vnet/main.c
+ index 6e136e19..69189c93 100644
+ --- a/src/vpp/vnet/main.c
+ +++ b/src/vpp/vnet/main.c
+ @@ -18,6 +18,8 @@
+ #include <vlib/unix/unix.h>
+ #include <vnet/plugin/plugin.h>
+ #include <vnet/ethernet/ethernet.h>
+ +#include <vnet/ip/ip4_packet.h>
+ +#include <vnet/ip/format.h>
+ #include <vpp/app/version.h>
+ #include <vpp/api/vpe_msg_enum.h>
+ #include <limits.h>
+ @@ -400,6 +402,63 @@ VLIB_CLI_COMMAND (test_crash_command, static) = {
+
+ #endif