Skip to content

Commit a68d79a

Browse files
committed
util: Add contributing and license
1 parent 1f8386d commit a68d79a

4 files changed

Lines changed: 109 additions & 61 deletions

File tree

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ implementation proposal in the referenced issues.
3434

3535
- [ ] Scope: The referenced issue is addressed, there are no unrelated changes.
3636
- [ ] Run Locally: Verified that the docs build using `make server`
37-
- [ ] New Features Marked: Documentation for new features is marked using the `new-in-version` shortcode, according to the guidelines in `README.md`.
38-
- [ ] Style Guidelines: Documentation obeys style guidelines in `README.md`.
39-
- [ ] Changelog: Significant features, behavior changes, deprecations and fixes are added to `CHANGELOG.md`.
40-
- [ ] Commits: Commit messages follow guidelines in `CONTRIBUTING.md`, there are no fixup commits left.
37+
- [ ] New Features Marked: Documentation for new features is marked using the `new-in-version` shortcode, according to the guidelines in [CONTRIBUTING](CONTRIBUTING.md).
38+
- [ ] Style Guidelines: Documentation obeys style guidelines in [CONTRIBUTING](CONTRIBUTING.md).
39+
- [ ] Commits: Commit messages follow guidelines in [CONTRIBUTING](CONTRIBUTING.md), there are no fixup commits left.

CONTRIBUTING.md

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# Contributing to The Things Stack Docs
2+
3+
Thank you for your interest in building this thing together with us. We're really happy with our active community and are glad that you're a part of it. There are many ways to contribute to our project, but given the fact that you're on Github looking at the code for The Things Stack Docs, you're probably here for one of the following reasons:
4+
5+
- **Asking a question**: If you have questions, please use the [forum](https://www.thethingsnetwork.org/forum/). We have a special [category for The Things Stack](https://www.thethingsnetwork.org/forum/c/network-and-routing/v3).
6+
- **Writing documentation**: If you see that our documentation is lacking or incorrect, it would be great if you could help us improve it. This will help users and fellow contributors understand how to better work with our stack. Better documentation helps prevent making mistakes and introducing new bugs. Our documentation is spread across a number of places. Code documentation for The Things Stack lives together with the [code](https://github.com/TheThingsNetwork/lorawan-stack). User documentation for The Things Stack is built from the source files in the `doc` folder of this repository. More general documentation can be found on [The Things Network's official documentation pages](https://www.thethingsnetwork.org/docs). The source files for that documentation can be found in [the `docs` repository](https://github.com/TheThingsNetwork/docs).
7+
8+
Style guidelines for contributing code and writing documentation can be found [here](README.md#style-guidelines).
9+
10+
## Branching
11+
12+
When contributing documentation to this repository, we follow a number of guidelines.
13+
14+
### Branch Naming
15+
16+
All branch names should begin with a topic. Accepted topics are:
17+
18+
- `doc`: documentation
19+
- `util`: utilities
20+
21+
All branches shall therefore have one of these names.
22+
23+
- `doc/#-short-name` or `doc/short-name`: refers to a documentation update, preferably with issue number. The short name describes the topic.
24+
- `util/#-short-name` or `util/short-name`: refers to updates to the way this repository is deployed or managed. The short name describes the feature.
25+
26+
### Scope
27+
28+
A branch should be **small and focused** and should be scoped to a **single specific task**. Do not combine new features and refactoring of existing documentation or tooling.
29+
30+
### Pull requests and rebasing
31+
32+
Pull requests shall close or reference issues. Please file an issue first before submitting a pull request. When submitting a pull request, please fill out all the sections in the pull request template.
33+
34+
- **Before** a reviewer is assigned, rebasing the branch to reduce the number of commits is highly advised. We recommend self-reviewing your own pull request: making the [commit](#commit) history clean, checking for typos or incoherences, and making sure Continuous Integration passes.
35+
- **During** a pull request's review, do not squash commits: it makes it harder for reviewers to read the evolution of a pull request. Making the commit history denser to answer reviewers' comments is acceptable at that point.
36+
- Once a pull request **has been approved** by the reviewers, it can be rebased on top of its target branch before it is merged. This is an opportunity for the contributor to clean up the commit history. A reviewer can also ask specifically for a rebase.
37+
38+
## Commits
39+
40+
Keep the commits to be merged clean: adhere to the commit message format defined below and instead of adding and deleting files within a pull request, drop or fix the concerning commit that added the file.
41+
42+
Interactive rebase (`git rebase -i`) can be used to edit or rewrite commits that do not follow these contribution guidelines.
43+
44+
## <a name="commit"></a>Commit Messages
45+
46+
The first line of a commit message is the subject. The commit message may contain a body, separated from the subject by an empty line.
47+
48+
### Commit Subject
49+
50+
The subject contains the concerning topic and a concise message in [the imperative mood](https://chris.beams.io/posts/git-commit/#imperative), starting with a capital. The subject may also contain references to issues or other resources.
51+
52+
The topic is typically a few characters long and should always be present. Accepted topics are:
53+
54+
- `doc`: documentation
55+
- `util`: utilities
56+
57+
Changes that affect multiple components can be comma separated.
58+
59+
Good commit messages:
60+
61+
- `doc: Add AppEUI to glossary`
62+
- `util: Refactor makefile`
63+
64+
Make sure that commits are scoped to something meaningful and could potentially be cherry-picked individually.
65+
66+
### Commit Body
67+
68+
The body may contain a more detailed description of the commit, explaining what it changes and why. The "how" is less relevant, as this should be obvious from the diff.
69+
70+
## Style Guidelines
71+
72+
Please respect the following guidelines for content in our documentation site. A copy and paste template for creating new documentation can be found [here](doc/content/example-template).
73+
74+
- Use the `{{< new-in-version "3.8.5" >}}` shortcode to tag documentation for features added in a particular version. For documentation that targets `master`, that's the next patch bump, e.g `3.8.x`. For documentation targeting `develop` that's the next minor bump, e.g `3.x.0`.
75+
- The title of a doc page is already rendered by the build system as a h1, don't add an extra one.
76+
- Use title case for headings.
77+
- A documentation page starts with an introduction, and then the first heading. The first paragraph of the introduction is typically a summary of the page. Use a `<!--more-->` to indicate where the summary ends.
78+
- Divide long documents into separate files, each with its own folder and `_index.md`.
79+
- Use the `weight`tag in the [Front Matter](https://gohugo.io/content-management/front-matter/) to manually sort sections if necessary. If not, they will be sorted alphabetically.
80+
- Since the title is a `h1`, everything in the content is at least `h2` (`##`).
81+
- Paragraphs typically consist of at least two sentences.
82+
- Use an empty line between all blocks (headings, paragraphs, lists, ...).
83+
- Prefer text over bullet lists or enumerations. For bullets, use `-`, for enumerations `1.` etc.
84+
- Explicitly call this product "The Things Stack". Not "the stack" etc. You can use the shortcode `{{% tts %}}` which will expand to "The Things Stack".
85+
- Avoid shortening, i.e. write "it is" instead of "it's".
86+
- Write guides as a goal-oriented journey.
87+
- Unless already clear from context, use a clearer term than "user", especially if there are multiple kinds (network operator, gateway owner, application developer, ...).
88+
- The user does not have a gender (so use they/them/their).
89+
- Taking screenshots is done as follows:
90+
- In Chrome: activate the **Developer Tools** and toggle the **Device Toolbar**. In the **Device Toolbar**, select **Laptop with HiDPI screen** (add it if not already there), and click **Capture Screenshot** in the menu on the right.
91+
- In Firefox: enter **Responsive Design Mode**. In the **Device Toolbar**, select "Laptop with HiDPI screen" (add it if not already there) and **Take a screenshot of the viewport**.
92+
- Use `**Strong**` when referring to buttons in the Console.
93+
- Use `>Note:`to add a note.
94+
- Use fenced code blocks with a language:
95+
- `bash` for lists of environment variables: `SOME_ENV="value"`.
96+
- `bash` for CLI examples. Prefix commands with `$ `. Wrap strings with double quotes `""` (except when working with JSON, which already uses double quotes).
97+
- Wrap large CLI output with `<details><summary>Show CLI output</summary> ... output here ... </details>`.
98+
- `yaml` (not `yml`) for YAML. Wrap strings with single quotes `''` (because of frequent Go templates that use double quotes).
99+
100+
## Legal
101+
102+
The Things Stack Documentation is Apache 2.0 licensed.

LICENSE

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -172,30 +172,3 @@
172172
defend, and hold each Contributor harmless for any liability
173173
incurred by, or claims asserted against, such Contributor by reason
174174
of your accepting any such warranty or additional liability.
175-
176-
END OF TERMS AND CONDITIONS
177-
178-
APPENDIX: How to apply the Apache License to your work.
179-
180-
To apply the Apache License to your work, attach the following
181-
boilerplate notice, with the fields enclosed by brackets "[]"
182-
replaced with your own identifying information. (Don't include
183-
the brackets!) The text should be enclosed in the appropriate
184-
comment syntax for the file format. We also recommend that a
185-
file or class name and description of purpose be included on the
186-
same "printed page" as the copyright notice for easier
187-
identification within third-party archives.
188-
189-
Copyright [yyyy] [name of copyright owner]
190-
191-
Licensed under the Apache License, Version 2.0 (the "License");
192-
you may not use this file except in compliance with the License.
193-
You may obtain a copy of the License at
194-
195-
http://www.apache.org/licenses/LICENSE-2.0
196-
197-
Unless required by applicable law or agreed to in writing, software
198-
distributed under the License is distributed on an "AS IS" BASIS,
199-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200-
See the License for the specific language governing permissions and
201-
limitations under the License.

README.md

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Lorawan Stack Documentation
1+
# The Things Stack Documentation
22

33
The documentation site for The Things Stack is built with [Hugo](https://gohugo.io/documentation/).
44
All content is stored as Markdown files in `doc/content`.
@@ -38,32 +38,6 @@ output the site to `public`.
3838
The documentation site can be built for internal (offline) use by running `make build.internal`. This will
3939
output the site to `internal`.
4040

41-
## Style Guidelines
42-
43-
Please respect the following guidelines for content in our documentation site. A copy and paste template for creating new documentation can be found [here](doc/content/example-template).
44-
45-
- Use the `{{< new-in-version "3.8.5" >}}` shortcode to tag documentation for features added in a particular version. For documentation that targets `master`, that's the next patch bump, e.g `3.8.x`. For documentation targeting `develop` that's the next minor bump, e.g `3.x.0`.
46-
- The title of a doc page is already rendered by the build system as a h1, don't add an extra one.
47-
- Use title case for headings.
48-
- A documentation page starts with an introduction, and then the first heading. The first paragraph of the introduction is typically a summary of the page. Use a `<!--more-->` to indicate where the summary ends.
49-
- Divide long documents into separate files, each with its own folder and `_index.md`.
50-
- Use the `weight`tag in the [Front Matter](https://gohugo.io/content-management/front-matter/) to manually sort sections if necessary. If not, they will be sorted alphabetically.
51-
- Since the title is a `h1`, everything in the content is at least `h2` (`##`).
52-
- Paragraphs typically consist of at least two sentences.
53-
- Use an empty line between all blocks (headings, paragraphs, lists, ...).
54-
- Prefer text over bullet lists or enumerations. For bullets, use `-`, for enumerations `1.` etc.
55-
- Explicitly call this product "The Things Stack". Not "the stack" etc. You can use the shortcode `{{% tts %}}` which will expand to "The Things Stack".
56-
- Avoid shortening, i.e. write "it is" instead of "it's".
57-
- Write guides as a goal-oriented journey.
58-
- Unless already clear from context, use a clearer term than "user", especially if there are multiple kinds (network operator, gateway owner, application developer, ...).
59-
- The user does not have a gender (so use they/them/their).
60-
- Taking screenshots is done as follows:
61-
- In Chrome: activate the **Developer Tools** and toggle the **Device Toolbar**. In the **Device Toolbar**, select **Laptop with HiDPI screen** (add it if not already there), and click **Capture Screenshot** in the menu on the right.
62-
- In Firefox: enter **Responsive Design Mode**. In the **Device Toolbar**, select "Laptop with HiDPI screen" (add it if not already there) and **Take a screenshot of the viewport**.
63-
- Use `**Strong**` when referring to buttons in the Console.
64-
- Use `>Note:`to add a note.
65-
- Use fenced code blocks with a language:
66-
- `bash` for lists of environment variables: `SOME_ENV="value"`.
67-
- `bash` for CLI examples. Prefix commands with `$ `. Wrap strings with double quotes `""` (except when working with JSON, which already uses double quotes).
68-
- Wrap large CLI output with `<details><summary>Show CLI output</summary> ... output here ... </details>`.
69-
- `yaml` (not `yml`) for YAML. Wrap strings with single quotes `''` (because of frequent Go templates that use double quotes).
41+
## Contributing
42+
43+
Please see the style, branch naming, and commit guidelines in [CONTRIBUTING](CONTRIBUTING.md)

0 commit comments

Comments
 (0)