From bdfa11846eb98ba9bfcaa627f385f557cd4757ea Mon Sep 17 00:00:00 2001 From: Michael Vincerra Date: Wed, 11 Jul 2018 17:09:18 -0700 Subject: [PATCH 1/4] Adds :contents: directive to Clear Linux collaboration guide. Signed-off-by: Michael Vincerra --- .../collaboration/documentation/contents.rst | 40 +++++++++++++++++++ .../collaboration/documentation/rest.rst | 1 + 2 files changed, 41 insertions(+) create mode 100644 source/clear-linux/reference/collaboration/documentation/contents.rst diff --git a/source/clear-linux/reference/collaboration/documentation/contents.rst b/source/clear-linux/reference/collaboration/documentation/contents.rst new file mode 100644 index 00000000..554fe4b2 --- /dev/null +++ b/source/clear-linux/reference/collaboration/documentation/contents.rst @@ -0,0 +1,40 @@ +.. _contents: + + +Contents directive +################## + +For |CL| documentation that has three or more sections, use the `contents:` +directive as shown in the example below. This directive automatically captures the headings (and +subheadings if used) as specified in the value given after `:depth:`. Adding this directive to +longer documents allows users to quickly navigate to the desired section. + + .. contents: :local: + :depth: 2 + +.. code-block:: bash + + .. contents: :local: + :depth: 2 + +.. note:: + + Assure that you add `:local:` as the value. For more resources on this directive, + visit the `reStruturedText Directives`_ + +EXAMPLE: + +Clear Linux Guide Example +************************* + +Introduction +========= + +Step-by-Step +============ + +Launch +====== + + +.. _reStruturedText Directives: http://docutils.sourceforge.net/0.4/docs/ref/rst/directives.html#table-of-contents diff --git a/source/clear-linux/reference/collaboration/documentation/rest.rst b/source/clear-linux/reference/collaboration/documentation/rest.rst index a11522bc..3b1a81f6 100644 --- a/source/clear-linux/reference/collaboration/documentation/rest.rst +++ b/source/clear-linux/reference/collaboration/documentation/rest.rst @@ -36,6 +36,7 @@ templates supplied. cross images code + contents .. _Sphinx documentation: From 8cce36d61fd80cba696bfa40b43d962c79dde797 Mon Sep 17 00:00:00 2001 From: Michael Vincerra Date: Thu, 12 Jul 2018 10:41:51 -0700 Subject: [PATCH 2/4] Fixes format for contents: directive Signed-off-by: Michael Vincerra --- .../reference/collaboration/documentation/contents.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/clear-linux/reference/collaboration/documentation/contents.rst b/source/clear-linux/reference/collaboration/documentation/contents.rst index 554fe4b2..9de87d64 100644 --- a/source/clear-linux/reference/collaboration/documentation/contents.rst +++ b/source/clear-linux/reference/collaboration/documentation/contents.rst @@ -9,8 +9,8 @@ directive as shown in the example below. This directive automatically captures t subheadings if used) as specified in the value given after `:depth:`. Adding this directive to longer documents allows users to quickly navigate to the desired section. - .. contents: :local: - :depth: 2 +.. contents: :local: + :depth: 2 .. code-block:: bash From a16acb908419c395a3911d98fad56abc6c9b6847 Mon Sep 17 00:00:00 2001 From: Michael Vincerra Date: Thu, 12 Jul 2018 10:49:17 -0700 Subject: [PATCH 3/4] Corrects formatting. Signed-off-by: Michael Vincerra --- .../reference/collaboration/documentation/contents.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/clear-linux/reference/collaboration/documentation/contents.rst b/source/clear-linux/reference/collaboration/documentation/contents.rst index 9de87d64..e722c7dc 100644 --- a/source/clear-linux/reference/collaboration/documentation/contents.rst +++ b/source/clear-linux/reference/collaboration/documentation/contents.rst @@ -9,12 +9,12 @@ directive as shown in the example below. This directive automatically captures t subheadings if used) as specified in the value given after `:depth:`. Adding this directive to longer documents allows users to quickly navigate to the desired section. -.. contents: :local: +.. contents:: :local: :depth: 2 .. code-block:: bash - .. contents: :local: + .. contents:: :local: :depth: 2 .. note:: From 4c818be239c10157e8174a2f15369c67b7de18d1 Mon Sep 17 00:00:00 2001 From: Michael Vincerra Date: Thu, 12 Jul 2018 15:09:34 -0700 Subject: [PATCH 4/4] Fixes typo. Signed-off-by: Michael Vincerra --- .../reference/collaboration/documentation/contents.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/clear-linux/reference/collaboration/documentation/contents.rst b/source/clear-linux/reference/collaboration/documentation/contents.rst index e722c7dc..6b4f043f 100644 --- a/source/clear-linux/reference/collaboration/documentation/contents.rst +++ b/source/clear-linux/reference/collaboration/documentation/contents.rst @@ -4,7 +4,7 @@ Contents directive ################## -For |CL| documentation that has three or more sections, use the `contents:` +For |CL| documentation that has three or more sections, use the `contents::` directive as shown in the example below. This directive automatically captures the headings (and subheadings if used) as specified in the value given after `:depth:`. Adding this directive to longer documents allows users to quickly navigate to the desired section.