From 06dcd45ff81e06bc8cf40ed487c0b2652d346a5a Mon Sep 17 00:00:00 2001 From: John DeNisco Date: Thu, 26 Jul 2018 12:45:10 -0400 Subject: Initial commit of Sphinx docs Change-Id: I9fca8fb98502dffc2555f9de7f507b6f006e0e77 Signed-off-by: John DeNisco --- .../writingdocs/styleguidemd/index.rst | 15 +++++ .../writingdocs/styleguidemd/styleguide.md | 13 +++++ .../writingdocs/styleguidemd/styleguide02.md | 66 ++++++++++++++++++++++ .../writingdocs/styleguidemd/styleguide03.md | 22 ++++++++ 4 files changed, 116 insertions(+) create mode 100644 docs/gettingstarted/writingdocs/styleguidemd/index.rst create mode 100644 docs/gettingstarted/writingdocs/styleguidemd/styleguide.md create mode 100644 docs/gettingstarted/writingdocs/styleguidemd/styleguide02.md create mode 100644 docs/gettingstarted/writingdocs/styleguidemd/styleguide03.md (limited to 'docs/gettingstarted/writingdocs/styleguidemd') diff --git a/docs/gettingstarted/writingdocs/styleguidemd/index.rst b/docs/gettingstarted/writingdocs/styleguidemd/index.rst new file mode 100644 index 00000000000..5bafb4d1512 --- /dev/null +++ b/docs/gettingstarted/writingdocs/styleguidemd/index.rst @@ -0,0 +1,15 @@ +.. _styleguidemd: + +#################### +Markdown Style Guide +#################### + +Most of these documents are written using :ref:`styleguide` (rst), but pages can also be +written in Markdown. This chapter describes some constructs used to write these documents. +For a more detailed description of Markdown refer to `Markdown Wikipedia `_ + +.. toctree:: + + styleguide.md + styleguide02.md + styleguide03.md diff --git a/docs/gettingstarted/writingdocs/styleguidemd/styleguide.md b/docs/gettingstarted/writingdocs/styleguidemd/styleguide.md new file mode 100644 index 00000000000..31ea822ca13 --- /dev/null +++ b/docs/gettingstarted/writingdocs/styleguidemd/styleguide.md @@ -0,0 +1,13 @@ +Heading 1 +========= + +This is the top heading level. More levels are shown below. + +Heading 2 +--------- + +### Heading 3 + +#### Heading 4 + +##### Heading 5 diff --git a/docs/gettingstarted/writingdocs/styleguidemd/styleguide02.md b/docs/gettingstarted/writingdocs/styleguidemd/styleguide02.md new file mode 100644 index 00000000000..b297d328082 --- /dev/null +++ b/docs/gettingstarted/writingdocs/styleguidemd/styleguide02.md @@ -0,0 +1,66 @@ +Bullets, Bold and Italics +========================= + +Bold text can be show with **Bold Text**, Italics with *Italic text*. +Bullets like so: + +- Bullet 1 +- Bullet 2 + +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. + +``` 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. + +``` c +#include +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 + #include + #include + +#include + +#include + #include + #include + #include + @@ -400,6 +402,63 @@ VLIB_CLI_COMMAND (test_crash_command, static) = { + + #endif diff --git a/docs/gettingstarted/writingdocs/styleguidemd/styleguide03.md b/docs/gettingstarted/writingdocs/styleguidemd/styleguide03.md new file mode 100644 index 00000000000..462006fd6f3 --- /dev/null +++ b/docs/gettingstarted/writingdocs/styleguidemd/styleguide03.md @@ -0,0 +1,22 @@ +Labels, References +================== + +A link or reference to other paragraphs within these documents can be +done with following construct. + +External Links +============== + +An external link is done with the following construct: + +[Sphinx Markup +Constructs](http://www.sphinx-doc.org/en/stable/markup/index.html) + +Images +====== + +Images should be placed in the directory docs/\_images. They can then be +referenced with following construct. This is the image created to show a +pull request. + +![](/_images/examplePullReq.png) -- cgit 1.2.3-korg