Skip to content

Commit dff0ee8

Browse files
committed
docs(contributing): add documentation contribution guidelines
1 parent f237364 commit dff0ee8

File tree

3 files changed

+106
-12
lines changed

3 files changed

+106
-12
lines changed

docs/CONTRIBUTING.rst

Lines changed: 106 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,24 @@ How to contribute
55

66
This document will eventually outline all aspects of guidance to make your contributing experience a fruitful and enjoyable one.
77
What it already contains is information about *commit message formatting* and how that directly affects the numerous automated processes that are used for this repo.
8+
It also covers how to contribute to this *formula's documentation*.
89

910
.. contents:: **Table of Contents**
1011

12+
Overview
13+
--------
14+
15+
Submitting a pull request is more than just code!
16+
To achieve a quality product, the *tests* and *documentation* need to be updated as well.
17+
An excellent pull request will include these in the changes, wherever relevant.
18+
1119
Commit message formatting
1220
-------------------------
1321

22+
Since every type of change requires making Git commits,
23+
we will start by covering the importance of ensuring that all of your commit
24+
messages are in the correct format.
25+
1426
Automation of multiple processes
1527
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1628

@@ -49,7 +61,7 @@ Linting commit messages in Travis CI
4961
This formula uses `commitlint <https://github.com/conventional-changelog/commitlint>`_ for checking commit messages during CI testing.
5062
This ensures that they are in accordance with the ``semantic-release`` settings.
5163

52-
For more details about the default settings, refer back to the ``commitlint`` `reference rules <https://conventional-changelog.github.io/commitlint/#/reference-rules>`_.
64+
For more details about the default settings, refer back to the ``commitlint`` `reference rules <https://conventional-changelog.github.io/commitlint/#/reference-rules>`_.
5365

5466
Relationship between commit type and version bump
5567
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -72,17 +84,17 @@ based upon the `type <https://github.com/angular/angular.js/blob/master/DEVELOPE
7284
- Build System
7385
- Changes related to the build system
7486
- –
75-
-
87+
-
7688
* - ``chore``
7789
- –
7890
- Changes to the build process or auxiliary tools and libraries such as documentation generation
7991
- –
80-
-
92+
-
8193
* - ``ci``
8294
- Continuous Integration
8395
- Changes to the continuous integration configuration
8496
- –
85-
-
97+
-
8698
* - ``docs``
8799
- Documentation
88100
- Documentation only changes
@@ -92,17 +104,17 @@ based upon the `type <https://github.com/angular/angular.js/blob/master/DEVELOPE
92104
- Features
93105
- A new feature
94106
- 0.1.0
95-
-
107+
-
96108
* - ``fix``
97109
- Bug Fixes
98110
- A bug fix
99111
- 0.0.1
100-
-
112+
-
101113
* - ``perf``
102114
- Performance Improvements
103115
- A code change that improves performance
104116
- 0.0.1
105-
-
117+
-
106118
* - ``refactor``
107119
- Code Refactoring
108120
- A code change that neither fixes a bug nor adds a feature
@@ -124,15 +136,13 @@ based upon the `type <https://github.com/angular/angular.js/blob/master/DEVELOPE
124136
- –
125137
- 0.0.1
126138

127-
128139
Use ``BREAKING CHANGE`` to trigger a ``major`` version change
129140
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
130141

131142
Adding ``BREAKING CHANGE`` to the footer of the extended description of the commit message will **always** trigger a ``major`` version change, no matter which type has been used.
132143
This will be appended to the changelog and release notes as well.
133144
To preserve good formatting of these notes, the following format is prescribed:
134145

135-
136146
* ``BREAKING CHANGE: <explanation in paragraph format>.``
137147

138148
An example of that:
@@ -145,3 +155,90 @@ An example of that:
145155
`template/package/`, this formula no longer supports the installation of
146156
packages.
147157
158+
Documentation
159+
-------------
160+
161+
Toolchain
162+
^^^^^^^^^
163+
164+
The documentation for this formula is written in
165+
`reStructuredText <https://en.wikipedia.org/wiki/ReStructuredText>`_
166+
(also known as RST, ReST, or reST).
167+
It is built by
168+
`Sphinx <https://en.wikipedia.org/wiki/Sphinx_(documentation_generator)>`_
169+
and hosted on
170+
`Read the Docs <https://en.wikipedia.org/wiki/Read_the_Docs>`_.
171+
172+
Adding a new page
173+
^^^^^^^^^^^^^^^^^
174+
175+
Adding a new page involves two steps:
176+
177+
#. Use the
178+
:ref:`saltstack_formulas_rst_page_template <provided page template>`
179+
to create a new page.
180+
#. Add the page name under the ``toctree`` list in ``index.rst``.
181+
182+
#. Do not just append it to the list.
183+
#. Select the best place where it fits within the overall documentation.
184+
185+
SaltStack-Formulas' RST page template
186+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
187+
188+
.. _saltstack_formulas_rst_page_template
189+
190+
Use the following template when creating a new page.
191+
This ensures consistency across the documentation for this formula.
192+
The heading symbols have been selected in accordance to the output rendered by the
193+
`Markdown to reStructuredText converter <https://github.com/miyakogi/m2r#restrictions>`_
194+
we are using for some of the pages of this documentation.
195+
196+
.. code-block:: rst
197+
198+
.. _template:
199+
200+
[Page title]
201+
============
202+
203+
[Introductory paragraph(s)]
204+
205+
.. contents:: **Table of Contents**
206+
207+
[Heading 2]
208+
-----------
209+
210+
[Heading 3]
211+
^^^^^^^^^^^
212+
213+
[Heading 4]
214+
~~~~~~~~~~~
215+
216+
[Heading 5]
217+
"""""""""""
218+
219+
[Heading 6]
220+
###########
221+
222+
#. The first line is an anchor that can be used to link back to (the top of)
223+
this file.
224+
225+
#. Change this to be the lowercase version of the file name.
226+
#. Do not include the ``.rst`` file extension.
227+
#. Use hyphens (``-``) instead of spaces or non-letter characters.
228+
229+
#. Change the ``[Page title]`` accordingly, matching the same number of ``=``
230+
underneath.
231+
#. Change the ``[Introductory paragraph(s)]`` to be a short summary of the page
232+
content.
233+
Use no more than three paragraphs for this.
234+
#. Leave the ``..contents:: **Table of Contents**`` line as it is.
235+
#. Use the remaining headings as required to break up the page content.
236+
237+
#. You will rarely need to use beyond ``[Heading 4]``.
238+
#. Again, no single heading should have more than about three paragraphs of
239+
#. content before the next heading or sub-heading is used.
240+
241+
Obviously, it is not necessary to follow the steps in the order above.
242+
For example, it is usually easier to write the ``[Introductory paragraph(s)]``
243+
at the end.
244+

docs/README.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,13 @@ which contains the currently released version. This formula is versioned accordi
3737

3838
See `Formula Versioning Section <https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html#versioning>`_ for more details.
3939

40-
4140
Contributing to this repo
4241
-------------------------
4342

4443
**Commit message formatting is significant!!**
4544

4645
Please see :ref:`contributing <CONTRIBUTING>` for more details.
4746

48-
4947
Available states
5048
----------------
5149

docs/TOFS_pattern.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ TOFS: A pattern for using SaltStack
2626
- https://github.com/myii
2727
- 23/02/2019
2828

29-
3029
All that follows is a proposal based on my experience with `SaltStack <http://www.saltstack.com/>`_. The good thing of a piece of software like this is that you can "bend it" to suit your needs in many possible ways, and this is one of them. All the recommendations and thoughts are given "as it is" with no warranty of any type.
3130

3231
.. contents:: **Table of Contents**

0 commit comments

Comments
 (0)