blob: ba35dcce1a1042a58e68e6ccc47ca95104af8615 [file] [log] [blame]
Rich Bennettd504dc82018-05-31 08:40:36 -04001.. This work is licensed under a Creative Commons Attribution 4.0
2.. International License. http://creativecommons.org/licenses/by/4.0
Rich Bennettac93e0e2017-07-19 01:36:52 -04003
4Addendum
5========
6
7Index File
Rich Bennett976bffd2017-08-15 07:56:32 -04008----------
Rich Bennettac93e0e2017-07-19 01:36:52 -04009
10The index file must relatively reference your other rst files in that directory.
11
12Here is an example index.rst :
13
14.. code-block:: bash
15
16 *******************
17 Documentation Title
18 *******************
19
20 .. toctree::
21 :numbered:
22 :maxdepth: 2
23
24 documentation-example
25
26Source Files
Rich Bennett976bffd2017-08-15 07:56:32 -040027------------
Rich Bennettac93e0e2017-07-19 01:36:52 -040028
29Document source files have to be written in reStructuredText format (rst).
Rich Bennett5baea462017-09-13 03:19:19 -040030Each file would be built as an html page.
Rich Bennettac93e0e2017-07-19 01:36:52 -040031
32Here is an example source rst file :
33
34.. code-block:: bash
35
36 =============
37 Chapter Title
38 =============
39
40 Section Title
41 =============
42
43 Subsection Title
44 ----------------
45
46 Hello!
47
48Writing RST Markdown
Rich Bennett976bffd2017-08-15 07:56:32 -040049--------------------
Rich Bennettac93e0e2017-07-19 01:36:52 -040050
51See http://sphinx-doc.org/rest.html .
52
53**Hint:**
Rich Bennettd504dc82018-05-31 08:40:36 -040054You can add html content that only appears in html output by using the
Rich Bennettac93e0e2017-07-19 01:36:52 -040055'only' directive with build type
56('html' and 'singlehtml') for an ONAP document. But, this is not encouraged.
57
58.. code-block:: bash
59
60 .. only:: html
61 This line will be shown only in html version.
62
Rich Bennett5baea462017-09-13 03:19:19 -040063
Spencer Seidela10d3f52017-09-07 13:58:17 -040064Creating Indices
65----------------
66
67Building an index for your Sphinx project is relatively simple. First, tell Sphinx that
68you want it to build an index by adding something like this after your TOC tree:
69
70.. code-block:: rst
71
72 Indices and Search
73 ==================
74
75 * :ref:`genindex`
76 * :ref:`search`
77
78**Hint:**
79Note that search was included here. It works out of the box with any Sphinx project, so you
80don't need to do anything except include a reference to it in your :code:`index.rst` file.
81
82Now, to generate a index entry in your RST, do one of the following:
83
84.. code-block:: rst
85
Rich Bennettd504dc82018-05-31 08:40:36 -040086 Some content that requires an :index:`index`.
Spencer Seidela10d3f52017-09-07 13:58:17 -040087
88or
89
90.. code-block:: rst
91
92 .. index::
93 single: myterm
94
95 Some header containing myterm
96 =============================
97
98In the second case, Sphinx will create a link in the index to the paragraph that follows
99the index entry declaration.
100
101When your project is built, Sphinx will generate an index page populated with the entries
102you created in the source RST.
103
104These are simple cases with simple options. For more information about indexing with Sphinx,
105please see the `official Sphinx documentation <http://www.sphinx-doc.org/en/stable/markup/misc.html#directive-index>`_.
106
Rich Bennett5baea462017-09-13 03:19:19 -0400107
Rich Bennett976bffd2017-08-15 07:56:32 -0400108Jenkins Jobs
109------------
110
Rich Bennettac93e0e2017-07-19 01:36:52 -0400111Verify Job
Rich Bennett976bffd2017-08-15 07:56:32 -0400112++++++++++
Rich Bennettac93e0e2017-07-19 01:36:52 -0400113
Rich Bennett976bffd2017-08-15 07:56:32 -0400114The verify job name is **doc-{stream}-verify-rtd**
Rich Bennettac93e0e2017-07-19 01:36:52 -0400115
Rich Bennettd504dc82018-05-31 08:40:36 -0400116Proposed changes in files in any repository with top level docs folder
117in the repository and RST files in below this folder
118will be verified by this job as part of a gerrit code review.
jsseidelda2324a2017-09-15 10:43:14 -0400119
Rich Bennettd504dc82018-05-31 08:40:36 -0400120.. Important::
121 The contributing author and every reviewer on a gerrit code review
122 should always review the Jenkins log before approving and merging a
123 change. The log review should include:
jsseidelda2324a2017-09-15 10:43:14 -0400124
Rich Bennettd504dc82018-05-31 08:40:36 -0400125 * Using a browser or other editor to search for a pattern in the
126 *console log* that matches files in the patch set. This will quickly
127 identify errors and warnings that are related to the patch set and
128 repository being changed.
129
130 * Using a browser to click on the *html* folder included in the log
131 and preview how the proposed changes will look when published at
132 Read The Docs. Small changes can be easily made in the patch set.
Rich Bennettac93e0e2017-07-19 01:36:52 -0400133
134Merge Job
Rich Bennett976bffd2017-08-15 07:56:32 -0400135+++++++++
Rich Bennettac93e0e2017-07-19 01:36:52 -0400136
Rich Bennett976bffd2017-08-15 07:56:32 -0400137The merge job name is **doc-{stream}-merge-rtd**.
Rich Bennettac93e0e2017-07-19 01:36:52 -0400138
Rich Bennettd504dc82018-05-31 08:40:36 -0400139When a committer merges a patch that includes files matching the
140path described above, the doc project merge job will trigger an
141update at readthedocs. There may be some delay after the merge job
142completes until new version appears at Read The Docs.
143
144Read The Docs URLs
145------------------
146
147When referencing versions of documentation a Read The Docs the following
148URL conventions should be used
149
150 +----------------------------------+----------------------------------------+
151 | URL | To Refer to |
152 +==================================+========================================+
153 | docs.onap.org | Most recent approved named release |
154 +----------------------------------+----------------------------------------+
155 | docs.onap.org/en/latest | Latest master branch all projects |
156 +----------------------------------+----------------------------------------+
157 | docs.onap.org/en/*named release* | An approved name release eg. amsterdam |
158 +----------------------------------+----------------------------------------+