blob: 2d8a25cfa52bdacd543b9662b62c00bfa20de3b1 [file] [log] [blame]
Rich Bennettac93e0e2017-07-19 01:36:52 -04001.. This work is licensed under a Creative Commons Attribution 4.0 International License.
2
3Addendum
4========
5
6Index File
Rich Bennett976bffd2017-08-15 07:56:32 -04007----------
Rich Bennettac93e0e2017-07-19 01:36:52 -04008
9The index file must relatively reference your other rst files in that directory.
10
11Here is an example index.rst :
12
13.. code-block:: bash
14
15 *******************
16 Documentation Title
17 *******************
18
19 .. toctree::
20 :numbered:
21 :maxdepth: 2
22
23 documentation-example
24
25Source Files
Rich Bennett976bffd2017-08-15 07:56:32 -040026------------
Rich Bennettac93e0e2017-07-19 01:36:52 -040027
28Document source files have to be written in reStructuredText format (rst).
Rich Bennett5baea462017-09-13 03:19:19 -040029Each file would be built as an html page.
Rich Bennettac93e0e2017-07-19 01:36:52 -040030
31Here is an example source rst file :
32
33.. code-block:: bash
34
35 =============
36 Chapter Title
37 =============
38
39 Section Title
40 =============
41
42 Subsection Title
43 ----------------
44
45 Hello!
46
47Writing RST Markdown
Rich Bennett976bffd2017-08-15 07:56:32 -040048--------------------
Rich Bennettac93e0e2017-07-19 01:36:52 -040049
50See http://sphinx-doc.org/rest.html .
51
52**Hint:**
53You can add html content that only appears in html output by using the
54'only' directive with build type
55('html' and 'singlehtml') for an ONAP document. But, this is not encouraged.
56
57.. code-block:: bash
58
59 .. only:: html
60 This line will be shown only in html version.
61
Rich Bennett5baea462017-09-13 03:19:19 -040062
Spencer Seidela10d3f52017-09-07 13:58:17 -040063Creating Indices
64----------------
65
66Building an index for your Sphinx project is relatively simple. First, tell Sphinx that
67you want it to build an index by adding something like this after your TOC tree:
68
69.. code-block:: rst
70
71 Indices and Search
72 ==================
73
74 * :ref:`genindex`
75 * :ref:`search`
76
77**Hint:**
78Note that search was included here. It works out of the box with any Sphinx project, so you
79don't need to do anything except include a reference to it in your :code:`index.rst` file.
80
81Now, to generate a index entry in your RST, do one of the following:
82
83.. code-block:: rst
84
85 Some content that requires an :index:`index`.
86
87or
88
89.. code-block:: rst
90
91 .. index::
92 single: myterm
93
94 Some header containing myterm
95 =============================
96
97In the second case, Sphinx will create a link in the index to the paragraph that follows
98the index entry declaration.
99
100When your project is built, Sphinx will generate an index page populated with the entries
101you created in the source RST.
102
103These are simple cases with simple options. For more information about indexing with Sphinx,
104please see the `official Sphinx documentation <http://www.sphinx-doc.org/en/stable/markup/misc.html#directive-index>`_.
105
Rich Bennett5baea462017-09-13 03:19:19 -0400106
Rich Bennett976bffd2017-08-15 07:56:32 -0400107Jenkins Jobs
108------------
109
Rich Bennettac93e0e2017-07-19 01:36:52 -0400110Verify Job
Rich Bennett976bffd2017-08-15 07:56:32 -0400111++++++++++
Rich Bennettac93e0e2017-07-19 01:36:52 -0400112
Rich Bennett976bffd2017-08-15 07:56:32 -0400113The verify job name is **doc-{stream}-verify-rtd**
Rich Bennettac93e0e2017-07-19 01:36:52 -0400114
Rich Bennett5baea462017-09-13 03:19:19 -0400115Proposed changes in files in any repository with the path
jsseidelda2324a2017-09-15 10:43:14 -0400116
Rich Bennett5baea462017-09-13 03:19:19 -0400117.. bash
jsseidelda2324a2017-09-15 10:43:14 -0400118
119 docs/**/*.rst
Rich Bennett5baea462017-09-13 03:19:19 -0400120
121will be verified by this job prior to a gerrit code review.
Rich Bennett976bffd2017-08-15 07:56:32 -0400122Please check the Jenkins log carefully for warnings.
123You can improve your document even if the verify job succeeded.
Rich Bennettac93e0e2017-07-19 01:36:52 -0400124
125Merge Job
Rich Bennett976bffd2017-08-15 07:56:32 -0400126+++++++++
Rich Bennettac93e0e2017-07-19 01:36:52 -0400127
Rich Bennett976bffd2017-08-15 07:56:32 -0400128The merge job name is **doc-{stream}-merge-rtd**.
Rich Bennettac93e0e2017-07-19 01:36:52 -0400129
Rich Bennett5baea462017-09-13 03:19:19 -0400130When a committer merges a patch that includes files matching the path described above,
131the doc project merge job will trigger an update at readthedocs.
132This might take about 15 minutes while readthedocs
133builds the documentation.